Documentation ¶
Index ¶
Constants ¶
View Source
const MaxLabelLength = 63
MaxLabelLength is the maximum length for a name that can be used in DNS.
Variables ¶
View Source
var InvalidNameRe = regexp.MustCompile(`[^A-Za-z0-9\\-]+`)
InvalidNameRe is a regex that matches characters which can not be included in a DNS name.
Functions ¶
func IsValidLabel ¶
IsValidLabel returns true if the string given is a valid DNS label (RFC 1123). Note: the only difference between RFC 1035 and RFC 1123 labels is that in RFC 1123 labels can begin with a number.
func ValidateLabel ¶
ValidateLabel is similar to IsValidLabel except it returns an error instead of false when name is not a valid DNS label. The error will contain reference to what constitutes a valid DNS label.
Types ¶
type RecursorStrategy ¶
type RecursorStrategy string
const ( RecursorStrategySequential RecursorStrategy = "sequential" RecursorStrategyRandom RecursorStrategy = "random" )
func (RecursorStrategy) Indexes ¶
func (s RecursorStrategy) Indexes(max int) []int
Click to show internal directories.
Click to hide internal directories.