netutil

package
v0.0.0-...-9a5932e Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2014 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

This packages contains a few utility functions for network related functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullyQualifiedHostname

func FullyQualifiedHostname() (string, error)

FullyQualifiedHostname returns the full hostname with domain

func FullyQualifiedHostnameOrPanic

func FullyQualifiedHostnameOrPanic() string

FullyQualifiedHostnameOrPanic is the same as FullyQualifiedHostname but panics in case of error

func ResolveAddr

func ResolveAddr(addr string) (string, error)

ResolveAddr can resolve an address where the host has been left blank, like ":3306"

func ResolveIpAddr

func ResolveIpAddr(addr string) (string, error)

ResolveIpAddr resolves the address:port part into an IP address:port pair

func SortRfc2782

func SortRfc2782(srvs []*net.SRV)

SortRfc2782 reorders SRV records as specified in RFC 2782.

func SplitHostPort

func SplitHostPort(addr string) (string, int, error)

SplitHostPort is an extension to net.SplitHostPort that also parses the integer port

Types

This section is empty.

Jump to

Keyboard shortcuts

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