checker

package module
v0.0.3-beta Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 4 Imported by: 0

README

Checker

A Go package for validating formats

please note that this package is currently in early beta testing and is subject to potential breaking changes

Email format validator
func main() {
    if err := checker.Email.Format("valid@example.com"); err != nil {
        fmt.Println(err) // err = "invalid email format"
    }
}
Email Host validator
func main() {
    if err := checker.Email.Host("invalid@hostdoesnotexist.com"); err != nil {
        fmt.Println(err) // err = "domain search returned 0 results"
    }
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatErr = errors.New("invalid email format")
View Source
var HostErr = errors.New("domain search returned 0 results")

Functions

func Email

func Email() *emailChecker

Types

This section is empty.

Jump to

Keyboard shortcuts

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