diff --git a/examples/main.go b/examples/main.go index e91268c..3160a46 100644 --- a/examples/main.go +++ b/examples/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/dongri/phonenumber" + "github.com/clerk/phonenumber" ) func main() { diff --git a/go.mod b/go.mod index 89b5d4b..f2c45f9 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/dongri/phonenumber +module github.com/clerk/phonenumber go 1.21 diff --git a/iso3166.go b/iso3166.go index eff5362..bdd293a 100644 --- a/iso3166.go +++ b/iso3166.go @@ -671,7 +671,7 @@ func populateISO3166() { i.CountryCode = "224" i.CountryName = "Guinea" i.MobileBeginWith = []string{"6"} - i.PhoneNumberLengths = []int{8} + i.PhoneNumberLengths = []int{8, 9} iso3166Datas = append(iso3166Datas, i) i.Alpha2 = "GP" @@ -1135,7 +1135,7 @@ func populateISO3166() { i.CountryCode = "95" i.CountryName = "Myanmar" i.MobileBeginWith = []string{"9"} - i.PhoneNumberLengths = []int{8} + i.PhoneNumberLengths = []int{8, 10, 11} iso3166Datas = append(iso3166Datas, i) i.Alpha2 = "ME" @@ -1422,8 +1422,8 @@ func populateISO3166() { i.Alpha3 = "PYF" i.CountryCode = "689" i.CountryName = "French Polynesia" - i.MobileBeginWith = []string{} - i.PhoneNumberLengths = []int{6} + i.MobileBeginWith = []string{"87", "88", "89"} + i.PhoneNumberLengths = []int{6, 8} iso3166Datas = append(iso3166Datas, i) i.Alpha2 = "QA" diff --git a/phonenumber_test.go b/phonenumber_test.go index 0fb82b4..2120a1e 100644 --- a/phonenumber_test.go +++ b/phonenumber_test.go @@ -73,6 +73,9 @@ var mobFormatTests = []struct { {"+51 912 640 074", "PE", "51912640074"}, {"+86 18 855 512 329", "CN", "8618855512329"}, {"+383 4 555 4999", "XK", "38345554999"}, + {"+224629295237", "GN", "224629295237"}, + {"+68989657111", "PF", "68989657111"}, + {"+959452929499", "MM", "959452929499"}, } func TestFormatMobile(t *testing.T) { @@ -143,6 +146,9 @@ var mobWithLLFormatTests = []struct { {"+51 999 400 500", "PE", "51999400500"}, {"+86 (16) 855-512-329", "CN", "8616855512329"}, {"+383 4 1234999", "XK", "38341234999"}, + {"+224629295237", "GN", "224629295237"}, + {"+68989657111", "PF", "68989657111"}, + {"+959452929499", "MM", "959452929499"}, } func TestFormatWithLandLine(t *testing.T) { @@ -305,6 +311,9 @@ var mobCountryTests = []struct { {"51907061970", "PE", true}, {"8613855512329", "CN", true}, {"38361234999", "XK", true}, + {"224629295237", "GN", true}, + {"68989657111", "PF", true}, + {"959452929499", "MM", true}, } func TestGetCountryForMobileNumber(t *testing.T) {