netx

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Overview

Package netx provides some convenient net functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IPIsOn added in v0.2.0

func IPIsOn(ip string) (on bool, err error)

IPIsOn reports whether the ip is configured on a certain network interface.

If ip is empty, return (false, nil).

func IsTimeout

func IsTimeout(err error) bool

IsTimeout reports whether the error is timeout.

func SplitHostPort

func SplitHostPort(hostport string) (host, port string)

SplitHostPort separates host and port. If the port is not valid, it returns the entire input as host, and it doesn't check the validity of the host. Unlike net.SplitHostPort, but per RFC 3986, it requires ports to be numeric.

Types

This section is empty.

Directories

Path Synopsis
Package netipx provides some convenient netip functions.
Package netipx provides some convenient netip functions.

Jump to

Keyboard shortcuts

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