Documentation
¶
Overview ¶
Package goanalysis provides Go type-aware analysis via go/types.
ConvertToCallGraph and MergeCallGraphs have moved to the callgraph package to avoid a circular dependency. Import callgraph directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasGoModule ¶
HasGoModule checks if dir contains a go.mod file.
Types ¶
type LoadOpts ¶
type LoadOpts struct {
Patterns []string // package patterns to load (default: "./...")
Timeout time.Duration // override default 60s timeout
}
LoadOpts configures package loading.
type LoadResult ¶
LoadResult contains loaded packages with full type information.
func LoadPackages ¶
type TypedEdge ¶
type TypedEdge struct {
CallerName string // function containing the call
CallerFile string // absolute path
CallerLine uint32 // line of the caller function definition
CalleeName string // called function/method name
CalleeFile string // absolute path (empty if external)
CalleePkg string // package path of callee
ReceiverType string // receiver type for method calls (empty for functions)
Line uint32 // line of the call site
IsInterface bool // true if this is interface dispatch
}
TypedEdge is a call edge with full type information from the Go compiler.
Click to show internal directories.
Click to hide internal directories.