types

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEmailAddress = errors.New("invalid e-mail address, address is missing @")
)

Functions

This section is empty.

Types

type EmailParts

type EmailParts struct {
	Address string
	Local   string
	Domain  string
}

func NewEmailFromParts

func NewEmailFromParts(local, domain string) EmailParts

NewEmailFromParts reconstructs EmailParts from two parts

func NewEmailParts

func NewEmailParts(emailAddress string) (EmailParts, error)

NewEmailParts takes an e-mail address and returns it lower-cased and in parts. It performs only the most minimal form of syntax validation. An error is returned when the address doesn't contain an @, or when the input size is abnormal.

Jump to

Keyboard shortcuts

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