Skip to content

Commit

Permalink
Merge pull request #171 from nyaruka/rem_server
Browse files Browse the repository at this point in the history
Remove phoneserver which hasn't worked for a while and isn't necessary
  • Loading branch information
rowanseymour authored May 28, 2024
2 parents 8685480 + 6c64f32 commit 82b07be
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 206 deletions.
3 changes: 0 additions & 3 deletions Makefile

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

golang port of Google's libphonenumber, forked from [libphonenumber from ttacon](https://github.com/ttacon/libphonenumber) which in turn is a port of the original [Java library](https://github.com/googlei18n/libphonenumber/tree/master/java/libphonenumber/src/com/google/i18n/phonenumbers).

You can see a live demo of the number parsing of the master branch of this library at [https://phonenumbers.temba.io/](https://phonenumbers.temba.io) Compare results with the official [Google Java version](https://rawgit.com/googlei18n/libphonenumber/master/javascript/i18n/phonenumbers/demo-compiled.html).

This fork fixes quite a few bugs and more closely follows the official Java implementation. It also adds the `buildmetadata` cmd to allow for rebuilding the metadata protocol buffers, country code to region maps and timezone prefix maps. We keep this library up to date with the upstream Google repo as metadata changes take place, usually no more than a few days behind official Google releases.

This library is used daily in production for parsing and validation of numbers across the world, so is well maintained. Please open an issue if you encounter any problems, we'll do our best to address them.
Expand Down
12 changes: 0 additions & 12 deletions cmd/phoneparser/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions cmd/phoneparser/go.sum

This file was deleted.

8 changes: 2 additions & 6 deletions cmd/phoneparser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ func main() {
num, err := phonenumbers.Parse(os.Args[1], os.Args[2])
if err != nil {
fmt.Printf("Error parsing number: %s\n", err)
os.Exit(1)
}

metadata, err := phonenumbers.Parse(os.Args[1], os.Args[2])
if err != nil {
fmt.Printf("error parsing phone", err.Error())
}
fmt.Printf(" E164: %s\n", phonenumbers.Format(num, phonenumbers.E164))
fmt.Printf("National Dialing: %s\n", phonenumbers.Format(num, phonenumbers.NATIONAL))
fmt.Printf(" National: %d\n", *num.NationalNumber)
fmt.Printf(" IsValid: %s\n", strconv.FormatBool(phonenumbers.IsValidNumber(metadata)))

fmt.Printf(" IsValid: %s\n", strconv.FormatBool(phonenumbers.IsValidNumber(num)))
}
15 changes: 0 additions & 15 deletions cmd/phoneserver/go.mod

This file was deleted.

20 changes: 0 additions & 20 deletions cmd/phoneserver/go.sum

This file was deleted.

74 changes: 0 additions & 74 deletions cmd/phoneserver/main.go

This file was deleted.

7 changes: 0 additions & 7 deletions netlify.toml

This file was deleted.

57 changes: 0 additions & 57 deletions site/index.html

This file was deleted.

0 comments on commit 82b07be

Please sign in to comment.