Package normalize contains functions to normalize usernames, domains and addresses.
Addr normalizes an email address, applying User and Domain to its respective components. On error, it will also return the original address to simplify callers.
Domain normalizes a DNS domain into a cleaned UTF-8 form. On error, it will also return the original domain to simplify callers.
func DomainToUnicode ¶
DomainToUnicode takes an address with an ASCII domain, and convert it to Unicode as per IDNA, including basic normalization. The user part is unchanged.