gomock
GoMock is a mocking framework for the Go programming language
...It is enabled by using the -source flag. Other flags that may be useful in this mode are -imports and -aux_files. Reflect mode generates mock interfaces by building a program that uses reflection to understand interfaces. It is enabled by passing two non-flag arguments, an import path, and a comma-separated list of symbols. The mockgen command is used to generate source code for a mock class given a Go source file containing interfaces to be mocked.