Standard Library

GoImporter

Go stdlib package — go/importer. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.Default()Neutral
#
Signature
Default() types.Importer

Default returns an Importer for the compiler that built the running binary.

.For()Neutral
#
Signature
For(compiler string, lookup Lookup) types.Importer

For calls ForCompiler with a new FileSet.

.ForCompiler()Neutral
#
Signature
ForCompiler(fset *token.FileSet, compiler string, lookup Lookup) types.Importer

ForCompiler returns an Importer for importing from installed packages

.Lookup()Neutral
#
Signature
type Lookup ...

A Lookup function returns a reader to access package data for

Fully-Qualified Names

FQNField
go/importerfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # go/importer