Documentation
¶
Index ¶
- func FindFuncSignature(p *packages.Package, fnName string) *types.Signature
- func FindInterfaceMethodSignature(p *packages.Package, intfName, methodName string) *types.Signature
- func GetFuncParamInfosFromSignature(fn *types.Signature, mockPkg string) []*gosyntax.FieldDeclInfo
- func GetFuncReturnInfosFromSignature(fn *types.Signature, mockPkg string) []*gosyntax.FieldDeclInfo
- func RenderTypeDeclString(t types.Type, variadic bool, mockPkg string) string
- type FuncTypeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFuncSignature ¶
func GetFuncParamInfosFromSignature ¶
func GetFuncParamInfosFromSignature(fn *types.Signature, mockPkg string) []*gosyntax.FieldDeclInfo
func GetFuncReturnInfosFromSignature ¶
func GetFuncReturnInfosFromSignature(fn *types.Signature, mockPkg string) []*gosyntax.FieldDeclInfo
Types ¶
type FuncTypeSpec ¶ added in v0.1.11
type FuncTypeSpec struct {
Signature *types.Signature
FieldInfo []*gosyntax.FieldDeclInfo
ReturnInfo []*gosyntax.FieldDeclInfo
}
Quick reference to GO type objects that are used in this package
Package {
Name() string
Path() string
Imports() []*Package
Scope() *Scope
elems (string -> types.Object)
}
types.Object (interface) {
Pkg() *Package // package to which this object belongs; nil for labels and objects in the Universe scope
Name() string // package local object name
Type() Type // object type
Exported() bool // reports whether the name starts with a capital letter
Id() string // object name if exported, qualified name if not exported (see func Id)
String() string
}
PkgName
TypeName
Const
Var
Func
Label
Builtin
Nil
types.Type (interface) {
Underlying() Type
String() string
}
Basic
Slice
Array
Struct
Interface
Map
Chan
Pointer
Signature (A Signature represents a (non-builtin) function or method type)
Tuple
Named
func GetFuncTypeSpec ¶ added in v0.1.11
func GetFuncTypeSpec(pkgPath, funcName string, mockPkgName string) (*FuncTypeSpec, error)
Click to show internal directories.
Click to hide internal directories.