address

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RFC 3696 Errata 1690
	MaximumLength = 254

	FieldName            = "name"
	FieldEmail           = "email"
	FieldFrom            = "from"
	FieldTo              = "to"
	FieldCarbonCopy      = "cc"
	FieldBlindCarbonCopy = "bcc"
)

Variables

View Source
var (
	ErrAbsentEmailAddress  = errors.New("absent email address")
	ErrEmailAddressTooLong = errors.New("email address too long")
	ErrEmailAddressInvalid = errors.New("email address is in the wrong format")
)

<https://ayada.dev/posts/validate-email-address-in-go/>

W3C has provided [recommendation](https://html.spec.whatwg.org/multipage/input.html#email-state-(type=email)) on the valid email address syntax. It also provides a regular expression that can be used to validate the syntax of the email address:

Functions

func Each

func Each(
	frontmatter map[string]any,
	rootDirectory string,
	fs fs.FS,
) iter.Seq2[map[string]any, error]

func EachUnique

func EachUnique(
	in iter.Seq2[map[string]any, error],
) iter.Seq2[map[string]any, error]

func New

func New(m map[string]any) (result mail.Address, err error)

func ValidateFormat

func ValidateFormat(emailAddress string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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