Documentation ¶
Overview ¶
xip is an IP (only v4 for now) parser that expands a given IP string to all the IP addresses it represents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse takes a string that represents an IP address, IP range, or CIDR block and return a list of individual IPs. Currently only IPv4 is supported.
For example:
10.1.1.1 -> 10.1.1.1 10.1.1.1,2 -> 10.1.1.1, 10.1.1.2 10.1.1,2.1 -> 10.1.1.1, 10.1.2.1 10.1.1,2.1,2 -> 10.1.1.1, 10.1.1.2 10.1.2.1, 10.1.2.2 10.1.1.1-2 -> 10.1.1.1, 10.1.1.2 10.1.1.-2 -> 10.1.1.0, 10.1.1.1, 10.1.1.2 10.1.1.1-10 -> 10.1.1.1, 10.1.1.2 ... 10.1.1.10 10.1.1.1- -> 10.1.1.1 ... 10.1.1.254, 10.1.1.255 10.1.1-3.1 -> 10.1.1.1, 10.1.2.1, 10.1.3.1 10.1-3.1-3.1 -> 10.1.1.1, 10.1.2.1, 10.1.3.1, 10.2.1.1, 10.2.2.1, 10.2.3.1, 10.3.1.1, 10.3.2.1, 10.3.3.1 10.1.1 -> 10.1.1.0, 10.1.1.1 ... 10.1.1.254, 10.1.1.255 10.1.1-2 -> 10.1.1.0, 10.1.1.1 ... 10.1.1.255, 10.1.2.0, 10.1.2.1 ... 10.1.2.255 10.1-2 -> 10.1.0.0, 10.1.0,1 ... 10.2.255.254, 10..2.255.255 10 -> 10.0.0.0 ... 10.255.255.255 10.1.1.2,3,4 -> 10.1.1.1, 10.1.1.2, 10.1.1.3, 10.1.1.4 10.1.1,2 -> 10.1.1.0, 10.1.1.1 ... 10.1.1.255, 10.1.2.0, 10.1.2.1 ... 10.1.2.255 10.1.1/28 -> 10.1.1.0 ... 10.1.1.255 10.1.1.0/28 -> 10.1.1.0 ... 10.1.1.15 10.1.1.0/30 -> 10.1.1.0, 10.1.1.1, 10.1.1.2, 10.1.1.3 10.1.1.128/25 -> 10.1.1.128 ... 10.1.1.255
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.