- func MethodSignature(method *types.Func) string
- type Function
- type Global
- type Interface
- type NamedType
- type Program
- type TypeWithMethods
func MethodSignature ¶
Make a readable version of a method signature (including the function name, excluding the receiver name). This string is used internally to match interfaces and to call the correct method on an interface. Examples:
String() string Read(byte) (int, error)
Function or method.
Return the name of the C function if this is a CGo wrapper. Otherwise, return a zero-length string.
func (*Function) IsExported ¶
Return true iff this function is externally visible.
func (*Function) IsInterrupt ¶
Return true for functions annotated with //go:interrupt. The function name is already customized in LinkName() to hook up in the interrupt vector.
On some platforms (like AVR), interrupts need a special compiler flag.
Global variable, possibly constant.
Return the name of the C global if this is a CGo wrapper. Otherwise, return a zero-length string.
Interface type that is at some point used in a type assert (to check whether it implements another interface).
Type with a name and possibly methods.
View on all functions, types, and globals in a program, with analysis results.
func NewProgram ¶
Create and intialize a new *Program from a *ssa.Program.
func (*Program) AddPackage ¶
Add a package to this Program. All packages need to be added first before any analysis is done for correct results.
func (*Program) IsVolatile ¶
Return true if this named type is annotated with the //go:volatile pragma, for volatile loads and stores.