Standard Library

GoNetNetip

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.

Other Methods

.Addr.AppendTo()Neutral
#
Signature
Addr.AppendTo(b []byte) []byte

AppendTo appends a text encoding of ip,

.Addr.As16()Neutral
#
Signature
Addr.As16() [16]byte

As16 returns the IP address in its 16-byte representation.

.Addr.As4()Neutral
#
Signature
Addr.As4() [4]byte

As4 returns an IPv4 or IPv4-in-IPv6 address in its 4-byte representation.

.Addr.AsSlice()Neutral
#
Signature
Addr.AsSlice() []byte

AsSlice returns an IPv4 or IPv6 address in its respective 4-byte or 16-byte representation.

.Addr.BitLen()Neutral
#
Signature
Addr.BitLen() int

BitLen returns the number of bits in the IP address:

.Addr.Compare()Neutral
#
Signature
Addr.Compare(ip2 Addr) int

Compare returns an integer comparing two IPs.

.Addr.Is4()Neutral
#
Signature
Addr.Is4() bool

Is4 reports whether ip is an IPv4 address.

.Addr.Is4In6()Neutral
#
Signature
Addr.Is4In6() bool

Is4In6 reports whether ip is an IPv4-mapped IPv6 address.

.Addr.Is6()Neutral
#
Signature
Addr.Is6() bool

Is6 reports whether ip is an IPv6 address, including IPv4-mapped

.Addr.IsGlobalUnicast()Neutral
#
Signature
Addr.IsGlobalUnicast() bool

IsGlobalUnicast reports whether ip is a global unicast address.

Fully-Qualified Names

FQNField
net/netipfqns[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 ...  # net/netip