dns

package
v3.22.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const SUBRE = "(([a-zA-Z0-9]{1}|[_a-zA-Z0-9]{1}[_a-zA-Z0-9-]{0,61}[a-zA-Z0-9]{1})[.]{1})+"

SUBRE is a regular expression that will match on all subdomains once the domain is appended.

Variables

This section is empty.

Functions

func AnySubdomainRegex

func AnySubdomainRegex() *regexp.Regexp

AnySubdomainRegex returns a Regexp object initialized to match any DNS subdomain name.

func AnySubdomainRegexString added in v3.7.0

func AnySubdomainRegexString() string

AnySubdomainRegexString returns a regular expression string to match any DNS subdomain name.

func CopyString

func CopyString(src string) string

CopyString return a new string variable with the same value as the parameter.

func IPv6NibbleFormat added in v3.4.1

func IPv6NibbleFormat(ip string) string

IPv6NibbleFormat expects an IPv6 address in the ip parameter and returns the address in nibble format.

func RemoveAsteriskLabel

func RemoveAsteriskLabel(s string) string

RemoveAsteriskLabel returns the provided DNS name with all asterisk labels removed.

func ReverseIP added in v3.4.1

func ReverseIP(ip string) string

ReverseIP returns an IP address that is the ip parameter with the numbers reversed.

func ReverseString

func ReverseString(s string) string

ReverseString returns the characters of the argument string in reverse order.

func SubdomainRegex

func SubdomainRegex(domain string) *regexp.Regexp

SubdomainRegex returns a Regexp object initialized to match subdomain names that end with the domain provided by the parameter.

func SubdomainRegexString added in v3.7.0

func SubdomainRegexString(domain string) string

SubdomainRegexString returns a regular expression string that matchs subdomain names ending with the domain provided by the parameter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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