packid

package
v0.0.0-...-c7609e9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "packid",
	Doc:              "simple package resolution to match 3rd-party functions against a list of safe calls",
	Run:              run,
	RunDespiteErrors: true,
	Requires:         []*analysis.Analyzer{inspect.Analyzer},
	ResultType:       reflect.TypeOf((*PackageResolver)(nil)),
}

Functions

This section is empty.

Types

type PackageResolver

type PackageResolver struct {
	// contains filtered or unexported fields
}

func (*PackageResolver) PackageFor

func (pr *PackageResolver) PackageFor(callExpr *ast.CallExpr, stack []ast.Node) (string, error)

PackageFor retrieves the package path for the provided call expression, if the call expression is a third-party function call.

Jump to

Keyboard shortcuts

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