typ

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyEmail = Email{
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Email

type Email struct {
	// contains filtered or unexported fields
}

Email defines an email address object.

func NewEmail

func NewEmail(value string) (Email, error)

NewEmail validates, normalises and creates a new email.

func (Email) Domain

func (e Email) Domain() string

Domain returns the part of an email address after the '@' sign.

func (Email) Equals

func (e Email) Equals(other string) bool

Equals checks if two email strings are the same.

func (Email) Normalised

func (e Email) Normalised() string

Normalised returns a lowercase and trimmed string representation of an email address.

type URL

type URL string

func NewURL

func NewURL(v string) URL

NewURL creates a new URL object.

func (URL) Empty

func (u URL) Empty() bool

Empty checks if the URL is empty.

func (URL) Pretty

func (u URL) Pretty() string

Pretty returns a string without any http/https prefix.

func (URL) String

func (u URL) String() string

String returns the URL as raw string.

Jump to

Keyboard shortcuts

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