Documentation ¶
Overview ¶
Package typeutil contains helepr methods for interaction with ast types
Index ¶
- func FindInterface(fileSet *token.FileSet, packageName string, interfaceName string) (*structs.Interface, error)
- func GetInterfaceMethod(interfaceType *types.Interface, methodName string) *types.Func
- func HasFieldOfType(targetStruct *types.Struct, fieldType reflect.Type) bool
- func IDFromNamed(name *types.Named) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindInterface ¶
func FindInterface( fileSet *token.FileSet, packageName string, interfaceName string, ) (*structs.Interface, error)
FindInterface finds the given interface name in the given package. Returns nil if no interface is found.
func GetInterfaceMethod ¶
GetInterfaceMethod returns the method with given name in the interface, or nil
func HasFieldOfType ¶
HasFieldOfType returns true if the given struct has a non-exported field of type fieldType
func IDFromNamed ¶
IDFromNamed returns a unique string for the given name
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.