go-mock icon indicating copy to clipboard operation
go-mock copied to clipboard

Feature Request: Given an interface, generate a mock

Open ryanwalls opened this issue 8 years ago • 3 comments

Would be great if this project had a generator similar to vektra/mockery or gomock's generator.

ryanwalls avatar Apr 11 '17 22:04 ryanwalls

I agree, I'll look into adding one.

maraino avatar Apr 14 '17 20:04 maraino

I've just discovered this project after writing my own mocking framework with a generator, I took inspiration from github.com/google/wire as I find the the generators for mockery and gomock are cumbersome and inflexible.

Would you be interested in this style of generator, see the README? The advantage is it effectively allows the author to add the methods to an existing struct.

au-phiware avatar Jan 09 '24 22:01 au-phiware

Hi @au-phiware, sure, I'm interested. But before you spend some time, I want to inform you that this project is inactive.

I know some people are using it. My only commit since 2018 was adding a go.mod because they asked for one. In any case, people using this would love a generator.

I'm now using https://github.com/golang/mock or its fork, https://github.com/uber-go/mock.

maraino avatar Jan 10 '24 01:01 maraino