iputil

package
v0.0.0-...-d29d52d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLocalhost

func IsLocalhost(addr string) bool

IsLocalhost returns true if addr is a localhost address Works for both ipv4 and ipv6 addresses.

func LocalhostIP

func LocalhostIP() (string, error)

LocalhostIP returns the address for localhost on the machine

func SplitAddr

func SplitAddr(addr string) (string, uint16, error)

SplitAddr splits an ip:port string to ip, port. Works for both ipv4 and ipv6 addresses. If the IP is not specified, returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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