Documentation
¶
Index ¶
Constants ¶
View Source
const ( InvalidIPv4CIDRError string = "IP address is invalid, it should be of the format a.b.c.d or a.b.c.d/e, where 0 <= a, b, c, d < 256 and 0 <= e <= 32" NonStandardizedIPError string = "IP address is not standardized, the IP part of IP/CIDR should be the first IP in the range" NoMoreSplittingPossibleError string = "There is only one IP address in this CIDR range, further splitting is not possible" RequestedIPExceedsCIDRRangeError string = "Requested IP exceeds the CIDR range" )
This set of constants defines strings corresponding to the new errors introduced in this package
View Source
const ( MaxUInt32 uint32 = ^uint32(0) MaxBits uint8 = 32 EightBits uint32 = 255 GroupSize uint8 = 8 HighestBitSet uint32 = uint32(1) << (MaxBits - 1) )
This set of constants contains the numeric constants used throughout this package
View Source
const (
IPv4CIDRRegex string = `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\/(?:[0-9]|[1-2][0-9]|3[0-2]))?$`
)
This set contains the regex patterns used in this package
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.