iputils

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-3.0 Imports: 2 Imported by: 10

Documentation

Overview

Package iputils contains useful functions for ip address formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalIP added in v1.0.0

func ExternalIP() (string, error)

ExternalIP returns the first IPv4/IPv6 available.

func ExternalIPv4

func ExternalIPv4() (string, error)

ExternalIPv4 returns the first IPv4 available.

func SortAddresses added in v1.0.0

func SortAddresses(ipAddrs []net.IP) []net.IP

SortAddresses sorts a set of addresses in the order of ipv4 -> ipv6.

Types

This section is empty.

Jump to

Keyboard shortcuts

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