maraino / go-mock

A mocking framework for the Go Programming Language.
MIT License
35 stars 12 forks source link

Feature Request: Given an interface, generate a mock #9

Open ryanwalls opened 7 years ago

ryanwalls commented 7 years ago

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

maraino commented 7 years ago

I agree, I'll look into adding one.

au-phiware commented 8 months ago

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.

maraino commented 8 months ago

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.