Skip to content

cozzbp/libphonenumber

 
 

Repository files navigation

libphonenumber

golang port of Google's libphonenumber

forthebadge

Build Status GoDoc

WARNING

There is currently a lot going on, I started this a while ago and recently picked it back up and got it functional. It was initially translated from the Java version of libphonenumber, but I wasn't a fan of always relying on loading proto files that were encoded in ObjectStreams (so all metadata is embedded in the code, and I'm exploring better ways to do this).

Pull requests are of course welcome, but things will be moving fast at first so they may not be accepted until I get this repo to a more stable state - currently it is VERY fragile.

I should get it cleaned up soon (think a few days) in which case I would love for help finishing this off :).

Examples

Super simple to use.

To get a phone number

num, err := libphonenumber.Parse("6502530000", "US")

To format a number

// num is a *libphonenumber.PhoneNumber
formattedNum := libphonenumber.Format(num, libphonenumber.NATIONAL)

About

golang port of Google's libphonenumber

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%