net

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 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.

func SplitUrlPath added in v0.0.13

func SplitUrlPath(path string) (parts []string)

SplitUrlPath splits an URL path into non-empty parts. This method is opposed to the standard 'split' method which allows empty parts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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