preload_packages

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:       "errstack_preload_packages",
	Doc:        _doc,
	Run:        helpers.WrapRun(run),
	ResultType: reflect.TypeOf((*helpers.Result[*Result])(nil)),
	Requires:   []*analysis.Analyzer{config.Analyzer},
}

Functions

This section is empty.

Types

type NodeInfo

type NodeInfo struct {
	Pass *model.Info
	Node ast.Node
}

type Result

type Result struct {
	Pkgs map[string]*packages.Package
	Objs map[token.Position]NodeInfo
	// contains filtered or unexported fields
}

func (*Result) Cleanup added in v0.4.0

func (lp *Result) Cleanup()

func (*Result) LoadObject

func (lp *Result) LoadObject(info *model.Info, obj types.Object) (*model.Info, ast.Node)

LoadObject loads the package containing the given object and returns its AST.

func (*Result) LoadSelector

func (lp *Result) LoadSelector(info *model.Info, x, sel string) (*model.Info, ast.Node)

LoadSelector loads the package containing the given selector and returns its AST.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL