Standard Library

GoFlag

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

Other Methods

.Arg()Neutral
#
Signature
Arg(i int) string

Arg returns the i'th command-line argument. Arg(0) is the first remaining argument

.Args()Neutral
#
Signature
Args() []string

Args returns the non-flag command-line arguments.

.Bool()Neutral
#
Signature
Bool(name string, value bool, usage string) *bool

Bool defines a bool flag with specified name, default value, and usage string.

.BoolFunc()Neutral
#
Signature
BoolFunc(name string, usage string, fn func(string) error)

BoolFunc defines a flag with the specified name and usage string without requiring values.

.BoolVar()Neutral
#
Signature
BoolVar(p *bool, name string, value bool, usage string)

BoolVar defines a bool flag with specified name, default value, and usage string.

.Duration()Neutral
#
Signature
Duration(name string, value time.Duration, usage string) *time.Duration

Duration defines a time.Duration flag with specified name, default value, and usage string.

.DurationVar()Neutral
#
Signature
DurationVar(p *time.Duration, name string, value time.Duration, usage string)

DurationVar defines a time.Duration flag with specified name, default value, and usage string.

.FlagSet.Arg()Neutral
#
Signature
FlagSet.Arg(i int) string

Arg returns the i'th argument. Arg(0) is the first remaining argument

.FlagSet.Args()Neutral
#
Signature
FlagSet.Args() []string

Args returns the non-flag arguments.

.FlagSet.Bool()Neutral
#
Signature
FlagSet.Bool(name string, value bool, usage string) *bool

Bool defines a bool flag with specified name, default value, and usage string.

Fully-Qualified Names

FQNField
flagfqns[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 ...  # flag