netutil

package
v0.0.0-...-c6effd4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailablePortForAddress

func GetAvailablePortForAddress(address string) (int32, error)

GetAvailablePortForAddress returns an open port on the specified address

func GetOutboundIP

func GetOutboundIP() net.IP

GetOutboundIP gets the locally preferred outbound IP address

From https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go

func ValidateDomainName

func ValidateDomainName(value string) error

ValidateDomainName validates the string value as a domain name

func ValidateHttpUrl

func ValidateHttpUrl(
	value string,
	requireSecureConnection bool,
	fetchContent bool,
) error

ValidateHttpUrl validates a URL for an HTTP scheme

Types

This section is empty.

Jump to

Keyboard shortcuts

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