Go stdlib package — net/netip. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.Addr.AppendTo()NeutralAddr.AppendTo(b []byte) []byte
AppendTo appends a text encoding of ip,
.Addr.As16()NeutralAddr.As16() [16]byte
As16 returns the IP address in its 16-byte representation.
.Addr.As4()NeutralAddr.As4() [4]byte
As4 returns an IPv4 or IPv4-in-IPv6 address in its 4-byte representation.
.Addr.AsSlice()NeutralAddr.AsSlice() []byte
AsSlice returns an IPv4 or IPv6 address in its respective 4-byte or 16-byte representation.
.Addr.BitLen()NeutralAddr.BitLen() int
BitLen returns the number of bits in the IP address:
.Addr.Compare()NeutralAddr.Compare(ip2 Addr) int
Compare returns an integer comparing two IPs.
.Addr.Is4In6()NeutralAddr.Is4In6() bool
Is4In6 reports whether ip is an IPv4-mapped IPv6 address.
.Addr.Is6()NeutralAddr.Is6() bool
Is6 reports whether ip is an IPv6 address, including IPv4-mapped
.Addr.IsGlobalUnicast()NeutralAddr.IsGlobalUnicast() bool
IsGlobalUnicast reports whether ip is a global unicast address.
| FQN | Field | |
|---|---|---|
| net/netip | 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 ... # net/netip