Skip to content

H-Richard/truemail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Documentation

truemail

An email validator package for Golang

Getting started

Importing the package

import (
	"github.com/H-Richard/truemail"
)

Validating format

func main() {
  //Validate only format
  v:= truemail.Validator{}
  fmt.PrintLn(v.Validate("[email protected]"))
}

Validating format and domains

func main() {
  //Validate both format and domain
  v := truemail.Validator{Domains: []string{"pm.me"}}
  fmt.PrintLn(v.Validate("[email protected]"))
}

Releases

No releases published

Packages

No packages published

Languages