utils

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrLookupHostname

func AddrLookupHostname(addr net.Addr) string

AddrLookupHostname returns the hostname (if possible) or address for the given `net.Addr`.

func ArgsToStrings

func ArgsToStrings(maxLength int, arguments []string, delim string) []string

ArgsToStrings takes the arguments and splits them into a series of strings, each argument separated by delim and each string bounded by maxLength.

func IPString

func IPString(addr net.Addr) string

IPString returns a simple IP string from the given net.Addr.

func IsHostname

func IsHostname(name string) bool

IsHostname returns whether we consider `name` a valid hostname.

func LookupHostname

func LookupHostname(addr string) string

LookupHostname returns the hostname for `addr` if it has one. Otherwise, just returns `addr`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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