address

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 20 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(
	ctx context.Context,
	frontmatter map[string]any,
	rootDirectory string,
	fs fs.FS,
) iter.Seq2[map[string]any, error]

func EachJoin added in v0.2.2

func EachJoin(in ...iter.Seq2[map[string]any, error]) 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

type ExecutableCommandError added in v0.1.8

type ExecutableCommandError struct {
	Command string
	Cause   error
}

func (ExecutableCommandError) Error added in v0.1.8

func (err ExecutableCommandError) Error() string

Jump to

Keyboard shortcuts

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