normalize

package
v0.0.0-...-bb97991 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL