Small project to map an E.164 (international) phone number to the ISO-3166-1 alpha 2 (two letter) country code, associated with that number.
GO version of same python project: phone_iso3166
go get -u github.com/teadove/go-phone-iso3166
package main
import "github.com/teadove/go-phone-iso3166/phone_iso3166"
func main() {
ru, _ := phone_iso3166.GetCountry(79778725196)
println(ru) // prints "RU"
kz, _ := phone_iso3166.GetCountryFromString("77051140999")
println(kz) // prints "KZ"
}
Peter Ibragimov @teadove
Match source code is available under the MIT License.