qsutils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAddress   = errors.New("invalid IP address/domain")
	ErrEmptyAddress     = errors.New("the address/domain is empty")
	ErrConnectionFailed = errors.New("failed to connect to the destination")
)

Functions

func IsAddressLocal

func IsAddressLocal(addr string) (bool, error)

Checks if the domain address is local

func IsAddressValid

func IsAddressValid(addr string) bool

func IsIpLocal

func IsIpLocal(addr string) (bool, error)

Checks if the IP address is local

func RandomString

func RandomString(length int) string

Generate a random string

func Round

func Round(num float64, precision int) float64

Rounds a floating point number to a precision/number of decimal places

Types

This section is empty.

Jump to

Keyboard shortcuts

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