Go stdlib package — go/build/constraint. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.GoVersion()NeutralGoVersion(x Expr) string
GoVersion returns the minimum Go version implied by a given build expression.
.IsGoBuild()NeutralIsGoBuild(line string) bool
IsGoBuild reports whether the line of text is a “//go:build” constraint.
.IsPlusBuild()NeutralIsPlusBuild(line string) bool
IsPlusBuild reports whether the line of text is a “// +build” constraint.
.Parse()NeutralParse(line string) (Expr, error)
Parse parses a single build constraint line of the form “//go:build ...” or “// +build ...”
| FQN | Field | |
|---|---|---|
| go/build/constraint | 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/constraint