dns

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 8

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

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

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

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

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