Documentation ¶
Overview ¶
Package netutil contains network-related utility functions.
Index ¶
- func FullyQualifiedHostname() (string, error)
- func FullyQualifiedHostnameOrPanic() string
- func JoinHostPort(host string, port int) string
- func ResolveAddr(addr string) (string, error)
- func ResolveIPv4Addr(addr string) (string, error)
- func ResolveIpAddr(addr string) (string, error)
- func SortRfc2782(srvs []*net.SRV)
- func SplitHostPort(addr string) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullyQualifiedHostname ¶
FullyQualifiedHostname returns the full hostname with domain
func FullyQualifiedHostnameOrPanic ¶
func FullyQualifiedHostnameOrPanic() string
FullyQualifiedHostnameOrPanic is the same as FullyQualifiedHostname but panics in case of error
func JoinHostPort ¶
JoinHostPort is an extension to net.JoinHostPort that also formats the integer port.
func ResolveAddr ¶
ResolveAddr can resolve an address where the host has been left blank, like ":3306".
func ResolveIPv4Addr ¶
ResolveIPv4Addr resolves the address:port part into an IP address:port pair
func ResolveIpAddr ¶
ResolveIpAddr resolves the address:port part into an IP address:port pair
func SortRfc2782 ¶
SortRfc2782 reorders SRV records as specified in RFC 2782.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.