Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove phoneserver which hasn't worked for a while and isn't necessary #171

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading