Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstDotSuffix ¶
FirstDotSuffix returns the suffix of a hostname starting from the first dot, e.g., "a.example.com" -> ".example.com". Returns false if there is no dot.
func IsValidWildcard ¶
IsValidWildcard returns true if the pattern is a single-label wildcard and the part after "*." contains at least two labels (e.g., "example.com"). This intentionally rejects broad patterns like "*.com".
func IsWildcard ¶
IsWildcard returns true if the pattern begins with a single-label wildcard ("*.").
func Normalize ¶
Normalize converts a hostname to its canonical ASCII lower-case form. - Trims spaces - Drops a trailing dot - Applies IDNA Lookup ToASCII mapping - Lower-cases the result
func NormalizeOrWildcard ¶
NormalizeOrWildcard behaves like Normalize but preserves a leading single-label wildcard pattern "*." if present.
func WildcardSuffix ¶
WildcardSuffix returns the canonical suffix (including the leading dot), e.g., for "*.example.com" it returns ".example.com". The boolean is false if the pattern is not a valid single-label wildcard.
Types ¶
This section is empty.