Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶ added in v0.1.1
Generate generates service interfaces to be used for generating mocks. The clients passed in as the first argument should be structs that will be used to generate the service interfaces. The second argument, dir, is the path to the output directory where the service interface files will be created.
func MethodHasAnyPrefix ¶
MethodHasAnyPrefix returns true if the method name has any of the given prefixes.
Types ¶
type Options ¶
type Options struct { // ShouldInclude tests whether a method should be included in the generated interfaces. If it returns true, // the method will be included. MethodHasPrefix and MethodHasSuffix can be used inside a custom function here // to customize the behavior. ShouldInclude func(reflect.Method) bool // ExtraImports can add extra imports for a method ExtraImports func(reflect.Method) []string }
func (*Options) SetDefaults ¶
func (o *Options) SetDefaults()
Click to show internal directories.
Click to hide internal directories.