validation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormaliseIPAddr

func NormaliseIPAddr(ip string) string

NormaliseIPAddr return ip address without /32 (IPv4 or /128 (IPv6)

func ValidCIDR

func ValidCIDR(ip string, cidr int) (ok bool)

func ValidIP

func ValidIP(ip string) bool

ValidIP return true if string ip contains a valid representation of an IPv4 or IPv6 address

func ValidPort

func ValidPort(port int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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