Documentation ¶
Index ¶
- func AddressContainsPort(addr string) bool
- func DNSNames() (dnsNames []string, err error)
- func DomainName() (domainname string, err error)
- func FormatAddress(addr string) string
- func IPAddrs() (ips []net.IP, err error)
- func IsIPv6(addrs ...net.IP) bool
- func NthIPInNetwork(network *net.IPNet, n int) (net.IP, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressContainsPort ¶ added in v0.6.0
AddressContainsPort checks to see if the supplied address contains both an address and a port. This will not catch every possible permutation, but it is a best-effort routine suitable for prechecking human-interactive parameters.
func DNSNames ¶ added in v0.3.0
DNSNames returns a default set of machine names. It includes the hostname, and FQDN if the kernel domain name is set. If the kernel domain name is not set, only the hostname is included in the set.
func DomainName ¶ added in v0.3.0
DomainName returns the kernel domain name. If a domain name is not found, an empty string is returned.
func FormatAddress ¶
FormatAddress checks that the address has a consistent format.
func IPAddrs ¶
IPAddrs finds and returns a list of non-loopback IP addresses of the current machine.
Types ¶
This section is empty.