Documentation ¶
Index ¶
- type Inspector
- func (ins *Inspector) FileName(pos token.Pos) string
- func (ins *Inspector) PackageName(pos token.Pos) string
- func (ins *Inspector) WalkAST(types []ast.Node, fn func(n ast.Node))
- func (ins *Inspector) WalkASTWithStack(types []ast.Node, ...)
- func (ins *Inspector) WalkPackages(fn func(pkg *packages.Package))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inspector ¶
type Inspector struct {
// contains filtered or unexported fields
}
func NewInspector ¶
NewInspector will find all .go files rooted at the given path and load them into the returned Inspector
func (*Inspector) WalkAST ¶
Walks the inspectors ast.Nodes in depth first order executing the provided fn before visiting children.
func (*Inspector) WalkASTWithStack ¶
func (*Inspector) WalkPackages ¶
Iterates over all Go packages in the order returned by golang.org/x/tools/go/packages.Load and calls the provided function with that package as an input.
Click to show internal directories.
Click to hide internal directories.