Skip to content

Commit

Permalink
Merge pull request #40 from mzhong9723/main
Browse files Browse the repository at this point in the history
Update canada mobile codes list
  • Loading branch information
dongri authored May 30, 2024
2 parents 7f07f4e + 9e73ada commit b97251f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions iso3166.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,12 @@ func populateISO3166() {
i.Alpha3 = "CAN"
i.CountryCode = "1"
i.CountryName = "Canada"
i.MobileBeginWith = []string{"204", "226", "236", "249", "250", "289", "306", "343", "365", "403", "416", "418", "431",
"437", "438", "450", "506", "514", "519", "579", "581", "587", "600", "604", "613", "639", "647", "705",
"709", "778", "780", "807", "819", "867", "873", "902", "905"}
i.MobileBeginWith = []string{
"204", "226", "236", "249", "250", "257", "263", "289", "306", "343", "354", "365", "367", "368", "382",
"387", "403", "416", "418", "428", "431", "437", "438", "450", "460", "468", "474", "506", "514", "519",
"537", "548", "568", "579", "581", "584", "587", "600", "604", "613", "639", "647", "672", "683", "705",
"709", "742", "753", "778", "780", "782", "807", "819", "825", "851", "867", "873", "879", "902", "905",
"942"}
i.PhoneNumberLengths = []int{10}
iso3166Datas = append(iso3166Datas, i)

Expand Down
1 change: 1 addition & 0 deletions phonenumber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var mobWithLLCountryTests = []struct {
{"8614855512329", "CN"},
{"38342224999", "XK"},
{"26876123456", "SZ"},
{"18251234567", "CA"},
}

func TestGetCountryForMobileNumberWithLandLine(t *testing.T) {
Expand Down

0 comments on commit b97251f

Please sign in to comment.