moq icon indicating copy to clipboard operation
moq copied to clipboard

Add feature to generate mocks in directory

Open horpto opened this issue 1 year ago • 1 comments

Hello, we use moq to generate mocks in the different directory in 1 mock to 1 file. So our genmock.go has a pile lines like this:

//go:generate moq -out "mocks/fee.go" -fmt goimports -skip-ensure . IFeeInterface
//go:generate moq -out "mocks/foo.go" -fmt goimports -skip-ensure . IFooInterface
//go:generate moq -out "mocks/goo.go" -fmt goimports -skip-ensure . IGooInterface

I'd like to add a feature to just specify directory and list of interfaces in one package. This also should be more quickly to generate mocks.

Also I fix version indication in release as gorelease will specify main.version, not main.Version

horpto avatar Mar 27 '23 01:03 horpto

Hi @breml! Ok, I created a new pr with only small changes.

horpto avatar Mar 28 '23 21:03 horpto