Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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)
Types ¶
type Function ¶
Function or method.
func (*Function) CName ¶
Return the name of the C function if this is a CGo wrapper. Otherwise, return a zero-length string.
func (*Function) Inline ¶ added in v0.6.0
func (f *Function) Inline() InlineType
Return the inline directive of this function.
func (*Function) IsExported ¶
Return true iff this function is externally visible.
func (*Function) IsNoBounds ¶
type InlineType ¶ added in v0.6.0
type InlineType int
const ( // Default behavior. The compiler decides for itself whether any given // function will be inlined. Whether any function is inlined depends on the // optimization level. InlineDefault InlineType = iota // Inline hint, just like the C inline keyword (signalled using // //go:inline). The compiler will be more likely to inline this function, // but it is not a guarantee. InlineHint // Don't inline, just like the GCC noinline attribute. Signalled using // //go:noinline. InlineNone )
How much to inline.
type Interface ¶
Interface type that is at some point used in a type assert (to check whether it implements another interface).
type Program ¶
type Program struct { Program *ssa.Program LoaderProgram *loader.Program Functions []*Function // contains filtered or unexported fields }
View on all functions, types, and globals in a program, with analysis results.
func NewProgram ¶
Create and initialize 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.