Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPrivate ¶
Whether the address lies in a block the IANA special-purpose registries mark not globally reachable (RFC 1918, unique local, loopback, link local, this network, protocol assignments, documentation, benchmarking, 6a44 relay, 6to4, Teredo, local NAT64, discard, dummy prefix, SRv6, reserved and broadcast space), the IPv6 protocol assignments block 2001::/23 counted whole apart from its PCP, TURN, AMT, AS112, ORCHIDv2 and drone ID entries; an IPv4-mapped address, and one in the NAT64 well-known prefix 64:ff9b::/96 or the IPv4-translated prefix ::ffff:0:0:0/96, is judged by the IPv4 address it reaches, a zone is ignored, shared space 100.64.0.0/10 is left to IsShared
func IsReserved ¶
Whether the address lies in space the IETF holds in reserve: IPv4 240.0.0.0/4 with the broadcast address, IPv6 outside global unicast 2000::/3, unique local, link local, site local and multicast space; an IPv4-mapped address is judged by its IPv4 address
func IsShared ¶
Whether the address lies in the shared address space 100.64.0.0/10 of carrier-grade NAT, an IPv4-mapped, NAT64 well-known prefix or IPv4-translated address judged by the IPv4 address it reaches
func ParseLenientIPv4 ¶
IPv4 address of a numeric host in the lenient spellings name resolvers and browsers accept: one to four dot separated parts, each decimal, octal after a leading 0 or hex after 0x, the last part filling the bytes left; the C library form may be followed by whitespace and anything after it, the browser form may end in one dot and write zero as a bare 0x
Types ¶
type ParseError ¶
Error of text that names no address or network, carrying the text and what is wrong with it
func (*ParseError) Error ¶
func (e *ParseError) Error() string
The quoted input followed by the reason