Go stdlib package — go/build. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.ArchChar()NeutralArchChar(goarch string) (string, error)
ArchChar returns "?" and an error.
.Context.Import()NeutralContext.Import(path string, srcDir string, mode ImportMode) (*Package, error)
Import returns details about the Go package named by the import path,
.Context.ImportDir()NeutralContext.ImportDir(dir string, mode ImportMode) (*Package, error)
ImportDir is like Import but processes the Go package found in
.Context.MatchFile()NeutralContext.MatchFile(dir string, name string) (bool, error)
MatchFile reports whether the file with the given name in the given directory
.Context.SrcDirs()NeutralContext.SrcDirs() []string
SrcDirs returns a list of package source root directories.
.Import()NeutralImport(path string, srcDir string, mode ImportMode) (*Package, error)
Import is shorthand for Default.Import.
.ImportDir()NeutralImportDir(dir string, mode ImportMode) (*Package, error)
ImportDir is shorthand for Default.ImportDir.
.IsLocalImport()NeutralIsLocalImport(path string) bool
IsLocalImport reports whether the import path is
.MultiplePackageError.Error()NeutralMultiplePackageError.Error() string
MultiplePackageError.Error function.
| FQN | Field | |
|---|---|---|
| go/build | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # go/build