Skip to content

Commit

Permalink
standardize on key names; notes and comments; update vendor deps
Browse files Browse the repository at this point in the history
thisisaaronland committed Sep 27, 2021
1 parent ee6e861 commit bdcbc20
Showing 20 changed files with 230 additions and 94 deletions.
2 changes: 1 addition & 1 deletion galleries/geometry.go
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ func multipoints(ctx context.Context, r reader.Reader, wofid int64) (orb.MultiPo
return orb.MultiPoint(points), nil

default:
return nil, fmt.Errorf("Weirdo geometry type for gallery %d, %s", wofid, geom.GeoJSONType)
return nil, fmt.Errorf("Weirdo geometry type for gallery %d, %s", wofid, geom.GeoJSONType())
}

}
6 changes: 3 additions & 3 deletions galleries/lookup_test.go
Original file line number Diff line number Diff line change
@@ -30,10 +30,10 @@ func TestGatesLookup(t *testing.T) {
t.Fatalf("Invalid results for '%s'", code)
}

a := results[0].(*Gate)
a := results[0].(*Gallery)

if a.WOFID != wofid {
t.Fatalf("Invalid match for '%s', expected %d but got %d", code, wofid, a.WOFID)
if a.WhosOnFirstId != wofid {
t.Fatalf("Invalid match for '%s', expected %d but got %d", code, wofid, a.WhosOnFirstId)
}
}
}
4 changes: 2 additions & 2 deletions gates/compile.go
Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@ func CompileGatesData(ctx context.Context, iterator_uri string, iterator_sources
name := whosonfirst.Name(f)

a := Gate{
WOFID: wof_id,
Name: name,
WhosOnFirstId: wof_id,
Name: name,
}

mu.Lock()
2 changes: 1 addition & 1 deletion gates/gates.go
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ package gates
// type Gate is a struct representing a passenger gate at SFO.
type Gate struct {
// The Who's On First ID associated with this gate.
WOFID int64 `json:"wof:id"`
WhosOnFirstId int64 `json:"wof:id"`
// The name of this gate.
Name string `json:"wof:name"`
}
2 changes: 1 addition & 1 deletion gates/lookup.go
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ func appendData(ctx context.Context, table *sync.Map, data *Gate) error {
pointer := fmt.Sprintf("pointer:%d", idx)
table.Store(pointer, data)

str_wofid := strconv.FormatInt(data.WOFID, 10)
str_wofid := strconv.FormatInt(data.WhosOnFirstId, 10)

possible_codes := []string{
data.Name,
6 changes: 3 additions & 3 deletions gates/lookup_test.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ func TestGatesLookup(t *testing.T) {

ctx := context.Background()

lu, err := architecture.NewLookup(ctx, "sfomuseum://")
lu, err := architecture.NewLookup(ctx, "gates://")

if err != nil {
t.Fatalf("Failed to create lookup, %v", err)
@@ -32,8 +32,8 @@ func TestGatesLookup(t *testing.T) {

a := results[0].(*Gate)

if a.WOFID != wofid {
t.Fatalf("Invalid match for '%s', expected %d but got %d", code, wofid, a.WOFID)
if a.WhosOnFirstId != wofid {
t.Fatalf("Invalid match for '%s', expected %d but got %d", code, wofid, a.WhosOnFirstId)
}
}
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ go 1.16
require (
github.com/aaronland/go-roster v0.0.2
github.com/paulmach/orb v0.2.2
github.com/sfomuseum/go-sfomuseum-geojson v0.1.2
github.com/sfomuseum/go-sfomuseum-geojson v0.1.3
github.com/sfomuseum/go-sfomuseum-reader v0.0.1
github.com/tidwall/gjson v1.7.5
github.com/tidwall/gjson v1.9.1
github.com/whosonfirst/go-reader v0.9.0
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.16.3
github.com/whosonfirst/go-whosonfirst-iterate v1.2.0
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ github.com/sfomuseum/go-edtf v0.2.3/go.mod h1:1rP0EJZ/84j3HO80vGcnG2T9MFBDAFyTNt
github.com/sfomuseum/go-flags v0.7.0/go.mod h1:ML3DTNbF9xnjExSdS/9FtVLjIUhRU5gm/ehzISv+t2w=
github.com/sfomuseum/go-sfomuseum-geojson v0.1.2 h1:rZM4b1+LrdP3Yzrsoed7Ror33gThictCpgqLmhESfdA=
github.com/sfomuseum/go-sfomuseum-geojson v0.1.2/go.mod h1:khGRObq7bqsMqr4VWrw0NmZQmTyV82YEYK90w7SF9mk=
github.com/sfomuseum/go-sfomuseum-geojson v0.1.3 h1:+OyduTQhBgVajdXFqXbX1hxuYY4IK56nYvaI/xtuPcY=
github.com/sfomuseum/go-sfomuseum-geojson v0.1.3/go.mod h1:s9/XT2coL6uShnA1reWOfBSOMJsDIERERxdVZQkQQjI=
github.com/sfomuseum/go-sfomuseum-reader v0.0.1 h1:PLEDmC+oDq/E8QKBd5p2hO0cK87hLVELlleD1LVBJJQ=
github.com/sfomuseum/go-sfomuseum-reader v0.0.1/go.mod h1:4QSnuOP9psngY6Wps/qhLXyiO4VCPh6nIfKx3LAUBM4=
github.com/skelterjohn/geom v0.0.0-20180103142417-96f3e8a219c5 h1:qQF/q/+xaKD4CAVz3zfuvpij8U4ihSGIhHfOROI4NFc=
@@ -39,13 +41,17 @@ github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJH
github.com/tidwall/gjson v1.6.8/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=
github.com/tidwall/gjson v1.7.5 h1:zmAN/xmX7OtpAkv4Ovfso60r/BiCi5IErCDYGNJu+uc=
github.com/tidwall/gjson v1.7.5/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk=
github.com/tidwall/gjson v1.9.1 h1:wrrRk7TyL7MmKanNRck/Mcr3VU1sdMvJHvJXzqBIUNo=
github.com/tidwall/gjson v1.9.1/go.mod h1:jydLKE7s8J0+1/5jC4eXcuFlzKizGrCKvLmBVX/5oXc=
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE=
github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.1.0 h1:K3hMW5epkdAVwibsQEfR/7Zj0Qgt4DxtNumTq/VloO8=
github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/whosonfirst/go-ioutil v1.0.0 h1:sYpgJx7Wsp76e7PFGa8KKQBvWQW3+HMCWSJbKdD5m14=
github.com/whosonfirst/go-ioutil v1.0.0/go.mod h1:2dS1vWdAIkiHDvDF8fYyjv6k2NISmwaIjJJeEDBEdvg=
github.com/whosonfirst/go-reader v0.2.0/go.mod h1:qUhz3OWefOUX/G1nzCEUzJskDjkF+l9oKPOM3K2fAJI=
@@ -58,6 +64,8 @@ github.com/whosonfirst/go-whosonfirst-flags v0.1.0/go.mod h1:bovMiQphaVhqemXFmNV
github.com/whosonfirst/go-whosonfirst-flags v0.2.0/go.mod h1:ECd0AJJZIlybmjTGB9z+CPz9pSiMTwxur7fPKmDnoqI=
github.com/whosonfirst/go-whosonfirst-flags v0.4.2 h1:HWjy/0MfAQMdCj4M9hi3LAITgK/D+cuDWGHP37mFeZo=
github.com/whosonfirst/go-whosonfirst-flags v0.4.2/go.mod h1:kewFjxBiE00SqjjIanm5DPI81SYvx93wVb3ogwV/PMk=
github.com/whosonfirst/go-whosonfirst-flags v0.4.3 h1:ef6IkgvYADL4kc750sl6i5hkReNq0Z6upLcqpK2CHLY=
github.com/whosonfirst/go-whosonfirst-flags v0.4.3/go.mod h1:pL17Ryo60FH8RYaQRgfu5XnxhrNRK3x+rn03TYD6Gc8=
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.14.1/go.mod h1:UkzipFE8gZC9NU1PLIE4DUwjFHOlafkoNxd2Ng0ZIjc=
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.16.3 h1:EaLfTJqWj7q3bVCNil+F9QtVylxiyWNlo09ZEUDtf+E=
github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.16.3/go.mod h1:R3GximAGJWLCITU2eh3I5Vtyze/usjOl5LTGQCDI89Y=
@@ -76,6 +84,7 @@ github.com/whosonfirst/go-whosonfirst-spr v0.1.0/go.mod h1:R8GtEVz1GVSnwwOjzcoVU
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.0.0 h1:UQ1n/uODS50mckZpXYe5GKm8XwoUUC1jRcNN8oiW2uc=
github.com/whosonfirst/go-whosonfirst-spr/v2 v2.0.0/go.mod h1:tveSSFDn8XoiCeAMarSCn769lA6e3Y0/Qi8S19Jz7Gw=
github.com/whosonfirst/go-whosonfirst-uri v0.2.0/go.mod h1:8eaDVcc4v+HHHEDaRbApdmhPwM4/JQllw2PktvZcPVs=
github.com/whosonfirst/go-whosonfirst-uri v1.0.1/go.mod h1:8eaDVcc4v+HHHEDaRbApdmhPwM4/JQllw2PktvZcPVs=
github.com/whosonfirst/go-whosonfirst-uri v1.1.0 h1:kNYOmKSm3u2asUOeq7yXL1Q8gFKkPIl8A0qinKrGV/8=
github.com/whosonfirst/go-whosonfirst-uri v1.1.0/go.mod h1:8eaDVcc4v+HHHEDaRbApdmhPwM4/JQllw2PktvZcPVs=
github.com/whosonfirst/walk v0.0.1 h1:t0QrqGwOdPMSeovFZSXfiS0GIGHrRXK3Wb9z5Uhs2bg=
5 changes: 0 additions & 5 deletions lookup.go
Original file line number Diff line number Diff line change
@@ -6,11 +6,6 @@ import (
"net/url"
)

// I do not look this, returning []interface{} instead of something
// less-obtuse but there isn't really any commonality (yet...) between
// the Aircraft thingies defined in the icao/sfomuseum packages...
// (20190430/thisisaaronland)

type Lookup interface {
Find(context.Context, string) ([]interface{}, error)
Append(context.Context, interface{}) error
11 changes: 6 additions & 5 deletions vendor/github.com/tidwall/gjson/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 33 additions & 2 deletions vendor/github.com/tidwall/gjson/SYNTAX.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 36 additions & 6 deletions vendor/github.com/tidwall/gjson/gjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/tidwall/gjson/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/tidwall/gjson/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 7 additions & 46 deletions vendor/github.com/tidwall/pretty/README.md
3 changes: 3 additions & 0 deletions vendor/github.com/tidwall/pretty/go.mod
118 changes: 110 additions & 8 deletions vendor/github.com/tidwall/pretty/pretty.go
4 changes: 2 additions & 2 deletions vendor/github.com/whosonfirst/go-whosonfirst-flags/go.mod
4 changes: 4 additions & 0 deletions vendor/github.com/whosonfirst/go-whosonfirst-flags/go.sum
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -27,20 +27,20 @@ github.com/sfomuseum/go-edtf/level2
github.com/sfomuseum/go-edtf/parser
github.com/sfomuseum/go-edtf/re
github.com/sfomuseum/go-edtf/tests
# github.com/sfomuseum/go-sfomuseum-geojson v0.1.2
# github.com/sfomuseum/go-sfomuseum-geojson v0.1.3
## explicit
github.com/sfomuseum/go-sfomuseum-geojson/feature
# github.com/sfomuseum/go-sfomuseum-reader v0.0.1
## explicit
github.com/sfomuseum/go-sfomuseum-reader
# github.com/skelterjohn/geom v0.0.0-20180103142417-96f3e8a219c5
github.com/skelterjohn/geom
# github.com/tidwall/gjson v1.7.5
# github.com/tidwall/gjson v1.9.1
## explicit
github.com/tidwall/gjson
# github.com/tidwall/match v1.0.3
github.com/tidwall/match
# github.com/tidwall/pretty v1.1.0
# github.com/tidwall/pretty v1.2.0
github.com/tidwall/pretty
# github.com/whosonfirst/go-ioutil v1.0.0
github.com/whosonfirst/go-ioutil
@@ -49,7 +49,7 @@ github.com/whosonfirst/go-ioutil
github.com/whosonfirst/go-reader
# github.com/whosonfirst/go-whosonfirst-crawl v0.2.1
github.com/whosonfirst/go-whosonfirst-crawl
# github.com/whosonfirst/go-whosonfirst-flags v0.4.2
# github.com/whosonfirst/go-whosonfirst-flags v0.4.3
github.com/whosonfirst/go-whosonfirst-flags
github.com/whosonfirst/go-whosonfirst-flags/existential
# github.com/whosonfirst/go-whosonfirst-geojson-v2 v0.16.3

0 comments on commit bdcbc20

Please sign in to comment.