Documentation ¶
Index ¶
- func GetHostIP() (net.IP, error)
- func GetLocalAddrs() ([]*net.IPNet, error)
- func GetLocalFirstIP() (string, error)
- func GetLocalFirstMac() (string, error)
- func GetLocalIPs() ([]string, error)
- func GetLocalMacs() ([]string, error)
- func IsIPv4(netIP net.IP) bool
- func IsIPv4String(ip string) bool
- func LookupHostIPv4(host string) (addrs []string, err error)
- func LookupHostIPv4WithContext(ctx context.Context, host string) (addrs []string, err error)
- func ParseIP(s string) net.IP
- func SplitHostIntPort(s string) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHostIP ¶ added in v0.0.20
HostIP tries to find an IP that can be used by other machines to reach this machine.
func GetLocalAddrs ¶
func GetLocalFirstIP ¶
func GetLocalFirstMac ¶
func GetLocalIPs ¶
func GetLocalMacs ¶
func IsIPv4String ¶ added in v0.0.61
func LookupHostIPv4 ¶ added in v0.0.61
func LookupHostIPv4WithContext ¶ added in v0.0.78
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.