Documentation ¶
Index ¶
- func Capacity(a, b net.IP) *big.Int
- func CheckNotEmpty(name, input string) error
- func Cmp(a, b net.IP) int
- func DeepCopyStringSlice(in []string) []string
- func DeepEqualStringSlice(a []string, b []string) bool
- func LastIP(subnet *net.IPNet) net.IP
- func MinUint32(a, b uint32) uint32
- func Network(ipn *net.IPNet) *net.IPNet
- func NextIP(ip net.IP) net.IP
- func NormalizedIP(ip string) string
- func ParseBoolOrDefault(in string, defaultValue bool) bool
- func PickFirstNonEmptyString(ss ...string) string
- func PrevIP(ip net.IP) net.IP
- func StringSliceToMap(in []string) (out map[string]struct{})
- func StringToIPNet(in string) *net.IPNet
- func ToDNSFormat(ip net.IP) string
- func ValidateIP(ip string) error
- func ValidateIPv4(ip string) error
- func ValidateIPv6(ip string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capacity ¶ added in v0.7.7
Capacity returns the absolute number of IPs between a and b. 0 is returned if a and b are of different IP families, or any of those two IPs is invalid.
func CheckNotEmpty ¶ added in v0.6.0
func Cmp ¶ added in v0.7.6
Cmp compares two IPs, returning the usual ordering: a < b : -1 a == b : 0 a > b : 1 incomparable : -2
func DeepCopyStringSlice ¶ added in v0.5.0
func DeepEqualStringSlice ¶ added in v0.4.0
func LastIP ¶ added in v0.3.0
LastIP Determine the last IP of a subnet, excluding the broadcast if IPv4
func Network ¶ added in v0.7.6
Network masks off the host portion of the IP, if IPNet is invalid, return nil
func NormalizedIP ¶
NormalizedIP If IP is valid, return itself otherwise empty string
func ParseBoolOrDefault ¶
func PickFirstNonEmptyString ¶
func StringSliceToMap ¶
func StringToIPNet ¶
func ToDNSFormat ¶ added in v0.5.0
func ValidateIP ¶ added in v0.6.0
func ValidateIPv4 ¶ added in v0.6.0
func ValidateIPv6 ¶ added in v0.6.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.