net

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrParseError             = "IP address parse error"
	ErrNotEnoughDataInAddress = "not enough data in address"
)

Variables

This section is empty.

Functions

func ParseIPA

func ParseIPA(s string) (ipa net.IP, err error)

ParseIPA parses a string into an IP address and returns an error on error. Golang's built-in parser does not return an error! What a shame.

func SplitHostPort

func SplitHostPort(addr string) (host, port string, err error)

SplitHostPort splits address into host and port and returns an error on error.While Go language does not have this very basic function, we are re-inventing the wheel again and again.

Types

This section is empty.

Jump to

Keyboard shortcuts

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