diff --git a/README.md b/README.md index 60cf5c1..c83e0df 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,22 @@ # 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. 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. +### Usage + +```go +import phoneiso3166 "github.com/onlinecity/go-phone-iso3166" +println(phoneiso3166.E164.Lookup(4566118311)) // prints: DK +``` + + ### Performance phone-iso3166 is reasonable fast