Permalink
Browse files

More fixes

  • Loading branch information...
peter-edge committed Dec 3, 2017
1 parent b73fdc0 commit aa14c6d502c7bac0fd3047b5387b7752b3f6d010
Showing with 4,363 additions and 4,691 deletions.
  1. +2 −0 README.md
  2. +7 −0 etc/cmd/gen-geo/main.go
  3. +7 −0 etc/cmd/gen-money/main.go
  4. +614 −733 go/pb/geo/geo.gen.go
  5. +1,355 −1,401 go/pb/geo/geo.gen.pb.go
  6. +614 −733 gogo/pb/geo/geo.gen.go
  7. +1,355 −1,401 gogo/pb/geo/geo.gen.pb.go
  8. +409 −423 proto/pb/geo/geo.gen.proto
@@ -10,6 +10,8 @@ Compiled well-known types from google/protobuf, compiled types from googleapis,

Compiled for both golang/protobuf and gogo/protobuf.

Types handled in github.com/golang/protobuf/ptypes and github.com/gogo/protobuf/types are not compiled.

Successor to [go.pedge.io/google-protobuf](https://go.pedge.io/google-protobuf) and [go.pedge.io/googleapis](https://go.pedge.io/googleapis), plus the extra
protos in [proto/pb](proto/pb), and lots more fun from generated code in [etc/tmpl](etc/tmpl). Specifically check out the geo and money packages.

@@ -62,6 +62,13 @@ func recordToTmplElem(record []string) (*tmplElem, error) {
if record[2] == "" || record[6] == "" || record[7] == "" || record[8] == "" || record[9] == "" {
return nil, nil
}
countryAlpha3Code := strings.ToUpper(record[7])
switch countryAlpha3Code {
// bad data, mostly because of multiple currencies
// TODO fix
case "BTN", "CUB", "HTI", "LSO", "NAM", "PAN", "SLV":
return nil, nil
}
countryNumericCode, err := strconv.ParseUint(record[8], 10, 32)
if err != nil {
return nil, err
@@ -59,6 +59,13 @@ func recordToTmplElem(record []string) (*tmplElem, error) {
if record[9] == "" || record[12] == "" {
return nil, nil
}
countryAlpha3Code := strings.ToUpper(record[7])
switch countryAlpha3Code {
// bad data, mostly because of multiple currencies
// TODO fix
case "BTN", "CUB", "HTI", "LSO", "NAM", "PAN", "SLV":
return nil, nil
}
var currencyMinorUnit uint64
var currencyNumericCode uint64
var err error

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit aa14c6d

Please sign in to comment.