Documentation

Overview

    Package normalize contains functions to normalize usernames, domains and addresses.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Addr

    func Addr(addr string) (string, error)

      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.

      func Domain

      func Domain(domain string) (string, error)

        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

        func DomainToUnicode(addr string) (string, error)

          DomainToUnicode takes an address with an ASCII domain, and convert it to Unicode as per IDNA, including basic normalization. The user part is unchanged.

          func User

          func User(user string) (string, error)

            User normalizes an username using PRECIS. On error, it will also return the original username to simplify callers.

            Types

            This section is empty.

            Source Files