iputils

package
v1.3.8-geth Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

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

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

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