Standard Library

GoScanner

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

Other Methods

.Error.Error()Neutral
#
Signature
Error.Error() string

Error implements the error interface.

.ErrorList.Add()Neutral
#
Signature
ErrorList.Add(pos token.Position, msg string)

Add adds an Error with given position and error message to an ErrorList.

.ErrorList.Err()Neutral
#
Signature
ErrorList.Err() error

Err returns an error equivalent to this error list.

.ErrorList.Error()Neutral
#
Signature
ErrorList.Error() string

An ErrorList implements the error interface.

.ErrorList.Len()Neutral
#
Signature
ErrorList.Len() int

ErrorList implements the sort Interface.

.ErrorList.Less()Neutral
#
Signature
ErrorList.Less(i int, j int) bool

ErrorList.Less function.

.ErrorList.RemoveMultiples()Neutral
#
Signature
ErrorList.RemoveMultiples()

RemoveMultiples sorts an ErrorList and removes all but the first error per line.

.ErrorList.Reset()Neutral
#
Signature
ErrorList.Reset()

Reset resets an ErrorList to no errors.

.ErrorList.Sort()Neutral
#
Signature
ErrorList.Sort()

Sort sorts an ErrorList. *Error entries are sorted by position,

.ErrorList.Swap()Neutral
#
Signature
ErrorList.Swap(i int, j int)

ErrorList.Swap function.

Fully-Qualified Names

FQNField
go/scannerfqns[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/scanner