gojuno / minimock

Powerful mock generation tool for Go programming language
MIT License
577 stars 38 forks source link

Set type name for generated mock #56

Closed rekby closed 3 years ago

rekby commented 3 years ago

For example I want generate mock for interface test/test.Interface. Now generated class will have name InterfaceMock. I want some similar to minimock -i test/test.Interface -name TestInterfaceMock and have generated name TestInterfaceMock.

And it nesessary if I want to mock two interfaces test/test.Interface and test/test2.Interface to one dest package.

Now I use workaround and create stub interface in dest package:

import "test/test"

type testInterface interface {
  test.Interface
}
damianopetrungaro commented 3 years ago

@rekby @hexdigest this can be marked as done

hexdigest commented 3 years ago

@rekby please take a look at -n flag in v3.0.9