identify

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 3 Imported by: 2

README

identify

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDomainName

func IsDomainName(s string) bool

IsDomainName checks if a string is a presentation-format domain name (currently restricted to hostname-compatible "preferred name" LDH labels and SRV-like "underscore labels".

func IsValidIP

func IsValidIP[T IPTypes](ip T) bool

IsValidIP checks whether ip is valid IP address.

func IsValidIPv4

func IsValidIPv4[T IPTypes](ip T) bool

IsValidIPv4 checks whether ip is valid IPv4 address.

func IsValidIPv6

func IsValidIPv6[T IPTypes](ip T) bool

IsValidIPv6 checks whether ip is valid IPv6 address.

func IsValidPort

func IsValidPort[T PortTypes](p T) bool

IsValidPort checks whether p is valid port number.

Types

type IPTypes

type IPTypes interface {
	net.IP | *net.IP | net.IPNet | *net.IPNet | net.IPAddr | *net.IPAddr | net.TCPAddr | *net.TCPAddr | net.UDPAddr | *net.UDPAddr | string
}

type PortTypes

type PortTypes interface {
	int8 | uint8 | int16 | uint16 | int32 | uint32 | int64 | uint64 | int | uint | string
}

Jump to

Keyboard shortcuts

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