Documentation
¶
Index ¶
Constants ¶
View Source
const ( PLUS_SIGN_REGEX = `(?i)^\+` NON_DIGIT_CHAR = `(?i)\D` ZERO_DIGIT_CHARS = `^0+` EIGHT_DIGIT_CHARS = `^8+` RUS_START_DIGIT_CHARS = `^89` )
Variables ¶
View Source
var ( NON_LEADING_ZERO_COUNTRIES = []string{"GAB", "CIV", "COG"} ErrNotFound = fmt.Errorf("No valid format found.") ErrPhoneMiss = fmt.Errorf("Unable to locate data from phone number.") )
View Source
var (
ISO3166_PhoneData []*PhoneData = []*PhoneData{}/* 226 elements not displayed */
)
Functions ¶
func IsValidPhoneISO3166 ¶
Types ¶
type PhoneData ¶
type PhoneData struct { CountryData countries.CountryData PhoneCode string MobileBeginsWith []string PhoneNumberLengths []int }
func GetDefaultISO3166 ¶
func GetDefaultISO3166() *PhoneData
func GetISO3166 ¶
func GetISO3166ByPhone ¶
func NewPhoneData ¶
func NewPhoneData() *PhoneData
type PhoneResult ¶
func NewPhoneResult ¶
func NewPhoneResult(phone, country string) *PhoneResult
func Normalise ¶
func Normalise(p, c string) (*PhoneResult, error)
Click to show internal directories.
Click to hide internal directories.