Documentation ¶
Overview ¶
Package net contains some generic tools and helpers that are missing from the go's standard library
Index ¶
- func ContainsIP(slice []net.IP, s net.IP) bool
- func IPNetFromAddrWithMask(addr net.Addr) (net.IPNet, error)
- func IPSliceFromStrings(addresses []string) []net.IP
- func Merge(first, second []net.IP) []net.IP
- func StringSliceFromIPs(addresses []net.IP) []string
- func TryRemove(set []net.IP, ip net.IP) []net.IP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsIP ¶
ContainsIP checks if a IP slice contains the IP
func IPNetFromAddrWithMask ¶
IPNetFromAddrWithMask converts from net.Addr with address in CIDR notation ("w.y.z.x/mm") into net.IPNet with IP and Mask
func IPSliceFromStrings ¶
IPSliceFromStrings takes a slice of strings representing IP addresses and converts them into a slice of net.IP
func Merge ¶
Merge adds all elements from second not existing in first to first and returns the resulting slice
func StringSliceFromIPs ¶
StringSliceFromIPs takes a slice of net.IP representing IP addresses and converts them into a slice of strings
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.