github.com/keysonZZZ/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgEmail/IsEmailFormat.go (about) 1 package kmgEmail 2 3 import ( 4 "regexp" 5 ) 6 7 var emailFormatPregex = regexp.MustCompile(`^[^@]+@[^@]+\.[^@]+$`) 8 9 func IsEmailFormat(email string) bool { 10 return emailFormatPregex.MatchString(email) 11 }