Skip to content

Commit 162369e

Browse files
committed
chore: separate go.mod and go.sum for tools
1 parent 9449178 commit 162369e

File tree

7 files changed

+42
-23
lines changed

7 files changed

+42
-23
lines changed

README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
phonenumbers [![Build Status](https://travis-ci.org/nyaruka/phonenumbers.svg?branch=master)](https://travis-ci.org/nyaruka/phonenumbers)
1+
phonenumbers [![Build Status](https://travis-ci.org/nyaruka/phonenumbers.svg?branch=master)](https://travis-ci.org/nyaruka/phonenumbers)
22
[![GoDoc](https://godoc.org/github.com/nyaruka/phonenumbers?status.svg)](https://godoc.org/github.com/nyaruka/phonenumbers)
33
==============
44

@@ -10,13 +10,11 @@ This fork fixes quite a few bugs and more closely follows the official Java impl
1010

1111
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.
1212

13-
Version Numbers
14-
=======
13+
# Version Numbers
1514

1615
As we don't want to bump our major semantic version number in step with the upstream library, we use independent version numbers than the Google libphonenumber repo. The release notes will mention what version of the metadata a release was built against.
1716

18-
Usage
19-
========
17+
# Usage
2018

2119
```go
2220
// parse our phone number
@@ -26,8 +24,7 @@ num, err := phonenumbers.Parse("6502530000", "US")
2624
formattedNum := phonenumbers.Format(num, phonenumbers.NATIONAL)
2725
```
2826

29-
Rebuilding Metadata and Maps
30-
===============================
27+
# Rebuilding Metadata and Maps
3128

3229
The `buildmetadata` command will fetch the latest XML file from the official Google repo and rebuild the go source files containing all the territory metadata, timezone and region maps. (you will need `svn` installed on your path)
3330

@@ -44,7 +41,6 @@ It will rebuild the following files:
4441
`prefix_to_timezone_bin.go` - contains the information needed to map a phone number prefix to a city or region
4542

4643
```bash
47-
% go get github.com/nyaruka/phonenumbers
48-
% go install github.com/nyaruka/phonenumbers/cmd/buildmetadata
44+
% cd cmd/buildmetadata && go install . && cd -
4945
% $GOPATH/bin/buildmetadata
5046
```

cmd/phoneparser/go.mod

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module github.com/nyaruka/phonenumbers/cmd/phoneparser
2+
3+
go 1.12
4+
5+
replace github.com/nyaruka/phonenumbers => ../../
6+
7+
require github.com/nyaruka/phonenumbers v0.0.0-00010101000000-000000000000

cmd/phoneparser/go.sum

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
github.com/aws/aws-lambda-go v1.8.1/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
4+
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
5+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
7+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

cmd/phoneserver/go.mod

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/nyaruka/phonenumbers/cmd/phoneserver
2+
3+
go 1.12
4+
5+
replace github.com/nyaruka/phonenumbers => ../../
6+
7+
require (
8+
github.com/aws/aws-lambda-go v1.13.1
9+
)

cmd/phoneserver/go.sum

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2+
github.com/aws/aws-lambda-go v1.8.1/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
3+
github.com/aws/aws-lambda-go v1.13.1 h1:qVIOD3UrEUo4amwgEBu6AI0CfnBsp71XJEYU05RbQ1k=
4+
github.com/aws/aws-lambda-go v1.13.1/go.mod h1:z4ywteZ5WwbIEzG0tXizIAUlUwkTNNknX4upd5Z5XJM=
5+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
6+
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
7+
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
8+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
10+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
11+
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ=
12+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
13+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

go.mod

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
module github.com/nyaruka/phonenumbers
22

3-
require (
4-
github.com/aws/aws-lambda-go v1.8.1
5-
github.com/golang/protobuf v1.3.2
6-
github.com/stretchr/testify v1.3.0 // indirect
7-
)
3+
require github.com/golang/protobuf v1.3.2

go.sum

-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
github.com/aws/aws-lambda-go v1.8.1 h1:nHBpP6XC30bwF6qWKrw/BrK2A8i4GKmSZzajTBIJS4A=
2-
github.com/aws/aws-lambda-go v1.8.1/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
3-
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
4-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
51
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
62
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
7-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
8-
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
9-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
10-
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
11-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

0 commit comments

Comments
 (0)