mockery
A mock code autogenerator for Golang
...It removes the boilerplate coding required to use mocks. mockery uses spf13/viper under the hood for its configuration parsing. It is bound to three different configuration sources, in order of decreasing precedence. By default, it searches the current working directory for a file named .mockery.[extension] where [extension] is any of the recognized extensions. Mockery will iteratively search every directory from the current working directory up to the root path for a .mockery.yaml file, if one is not explicitly provided. If your tests need access to the arguments to calculate the return values, set the return value to a function that takes the method's arguments as its own arguments and returns the return value.