Go stdlib package — go/constant. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.BinaryOp()NeutralBinaryOp(x_ Value, op token.Token, y_ Value) Value
BinaryOp returns the result of the binary expression x op y.
.BitLen()NeutralBitLen(x Value) int
BitLen returns the number of bits required to represent
.BoolVal()NeutralBoolVal(x Value) bool
BoolVal returns the Go boolean value of x, which must be a Bool or an Unknown.
.Bytes()NeutralBytes(x Value) []byte
Bytes returns the bytes for the absolute value of x in little-
.Compare()NeutralCompare(x_ Value, op token.Token, y_ Value) bool
Compare returns the result of the comparison x op y.
.Denom()NeutralDenom(x Value) Value
Denom returns the denominator of x; x must be Int, Float, or Unknown.
.Float32Val()NeutralFloat32Val(x Value) (float32, bool)
Float32Val is like Float64Val but for float32 instead of float64.
.Float64Val()NeutralFloat64Val(x Value) (float64, bool)
Float64Val returns the nearest Go float64 value of x and whether the result is exact;
.Imag()NeutralImag(x Value) Value
Imag returns the imaginary part of x, which must be a numeric or unknown value.
.Int64Val()NeutralInt64Val(x Value) (int64, bool)
Int64Val returns the Go int64 value of x and whether the result is exact;
| FQN | Field | |
|---|---|---|
| go/constant | 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/constant