ipaddr

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2019 License: MPL-2.0 Imports: 3 Imported by: 174

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateIPv4 added in v1.0.0

func GetPrivateIPv4() ([]*net.IPAddr, error)

GetPrivateIPv4 returns the list of private network IPv4 addresses on all active interfaces.

func GetPublicIPv6 added in v1.0.0

func GetPublicIPv6() ([]*net.IPAddr, error)

GetPublicIPv6 returns the list of all public IPv6 addresses on all active interfaces.

func IsAny

func IsAny(ip interface{}) bool

IsAny checks if the given ip address is an IPv4 or IPv6 ANY address. ip can be either a *net.IP or a string. It panics on another type.

func IsAnyV4

func IsAnyV4(ip interface{}) bool

IsAnyV4 checks if the given ip address is an IPv4 ANY address. ip can be either a *net.IP or a string. It panics on another type.

func IsAnyV6

func IsAnyV6(ip interface{}) bool

IsAnyV6 checks if the given ip address is an IPv6 ANY address. ip can be either a *net.IP or a string. It panics on another type.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL