Standard Library

GoPath

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

Other Methods

.Base()Neutral
#
Signature
Base(path string) string

Base returns the last element of path.

.Clean()Neutral
#
Signature
Clean(path string) string

Clean returns the shortest path name equivalent to path

.Dir()Neutral
#
Signature
Dir(path string) string

Dir returns all but the last element of path, typically the path's directory.

.Ext()Neutral
#
Signature
Ext(path string) string

Ext returns the file name extension used by path.

.IsAbs()Neutral
#
Signature
IsAbs(path string) bool

IsAbs reports whether the path is absolute.

.Join()Neutral
#
Signature
Join(elem string) string

Join joins any number of path elements into a single path,

.Match()Neutral
#
Signature
Match(pattern string, name string) (bool, error)

Match reports whether name matches the shell pattern.

.Split()Neutral
#
Signature
Split(path string) (string, string)

Split splits path immediately following the final slash,

Fully-Qualified Names

FQNField
pathfqns[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 ...  # path