Documentation
¶
Overview ¶
Package domainname owns the Draft-09 Section 18 conversion of protocol domain names from U-labels to A-labels.
Input is treated as a protocol label sequence, not as browser or user input: ASCII letters are case-folded, but no Unicode compatibility mapping, width folding, alternate dot separators, or transitional processing is applied. U-labels must already be NFC and valid under the IDNA2008 registration profile of golang.org/x/net/idna, including the Bidi and joiner rules; existing A-labels are validated by decoding. Output is a lowercase ASCII A-label domain. A failure never returns partial output.
Plain ASCII names without an "xn--" label take an LDH fast path that keeps their previous handling; it does not apply the IDNA hyphen rule for reserved "??--" labels, which is harmless for DNS lookup and comparison.
Known limitation: golang.org/x/net/idna collapses the IDNA2008 NV8 and XV8 categories into "valid", so it is not a complete strict IDNA2008 validator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsASCII ¶
IsASCII reports whether domain contains only ASCII bytes, which is the form Draft-09 Section 18 requires for domains recorded in DKIM2 header fields.
Types ¶
This section is empty.