Documentation
¶
Overview ¶
Package ip provides IP address related functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatHostname ¶
Add brackets based on whether the given string is IPv6 or not. If the input is an IPv6 address, wraps it in square brackets `[ ]`. Otherwise, it returns the input string as-is (for domain names or IPv4 addresses).
func IsIPv6Only ¶
IsIPv6Only returns true if all given IPs are IPv6
func SliceToString ¶
SliceToString converts []net.IP to a string separated by comma. If the separator is empty, it defaults to ",".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.