Documentation ¶
Index ¶
- func GenImplStubs(recv string, fns []Func, implemented map[string]bool) []byte
- func GenInterfaceStubs(ifaceName string, fns []Func) []byte
- func GetReceiverType(recv string) string
- func ImplementedFuncs(fns []Func, recv string, srcDir string) (map[string]bool, error)
- func NewCommand() *cli.Command
- type Func
- type Method
- type Param
- type Pkg
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenImplStubs ¶
GenImplStubs prints nicely formatted method stubs for fns using receiver expression recv. If recv is not a valid receiver expression, genImplStubs will panic. genImplStubs won't generate stubs for already implemented methods of receiver.
func GenInterfaceStubs ¶
GenInterfaceStubs generates interface stub code.
func GetReceiverType ¶
GetReceiverType returns type name of receiver or fatal if receiver is invalid. ex: for definition "r *SomeType" will return "SomeType"
func ImplementedFuncs ¶
ImplementedFuncs returns list of Func which already implemented.
Types ¶
type Func ¶
Func represents a function signature.
Click to show internal directories.
Click to hide internal directories.