evmail

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AT store at symbol
	AT = "@"
)

Variables

This section is empty.

Functions

func SeparateEmail

func SeparateEmail(email string) (string, string)

SeparateEmail separates email by "@" and returns two parts

Types

type Address

type Address interface {
	Username() string
	Domain() string
	fmt.Stringer
}

Address represents email

func EmptyEmail

func EmptyEmail(val Address, defaultVal Address) Address

EmptyEmail return defaultVal if val is nil

func FromString

func FromString(email string) Address

FromString forms Address from string

func NewEmailAddress

func NewEmailAddress(username, domain string) Address

NewEmailAddress forms Address from username and domain

func NewEmailAddressWithSource

func NewEmailAddressWithSource(username, domain, source string) Address

NewEmailAddressWithSource forms Address source used to store empty emails or without username or domain part

Jump to

Keyboard shortcuts

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