README Improvements

master v0.0.1
Hans Viken Duedal 2019-07-12 22:01:26 +02:00
parent 26bb7277d6
commit 6816eb8803
1 changed files with 11 additions and 0 deletions

View File

@ -1,11 +1,22 @@
# phone-iso3166 # phone-iso3166
[![Go Report Card](https://goreportcard.com/badge/github.com/onlinecity/go-phone-iso3166)](https://goreportcard.com/report/github.com/onlinecity/go-phone-iso3166)
[![go-doc](https://godoc.org/github.com/onlinecity/go-phone-iso3166?status.svg)](https://godoc.org/github.com/onlinecity/go-phone-iso3166)
Maps an E.164 (international) phone number to the ISO-3166-1 alpha 2 (two letter) country code, associated with that number. Maps an E.164 (international) phone number to the ISO-3166-1 alpha 2 (two letter) country code, associated with that number.
Also provides mapping for E.212 (mobile network codes, mcc+mnc) to the country. Also provides mapping for E.212 (mobile network codes, mcc+mnc) to the country.
It's based on it's python namesake [onlinecity/phone-iso3166](https://github.com/onlinecity/phone-iso3166) - but uses a [radix](https://github.com/hashicorp/go-immutable-radix) as it's datastructure. It's based on it's python namesake [onlinecity/phone-iso3166](https://github.com/onlinecity/phone-iso3166) - but uses a [radix](https://github.com/hashicorp/go-immutable-radix) as it's datastructure.
### Usage
```go
import phoneiso3166 "github.com/onlinecity/go-phone-iso3166"
println(phoneiso3166.E164.Lookup(4566118311)) // prints: DK
```
### Performance ### Performance
phone-iso3166 is reasonable fast phone-iso3166 is reasonable fast