From 857f4798c50fdf212c06afaf85bd9766c6bc0bb8 Mon Sep 17 00:00:00 2001 From: tidwall Date: Fri, 11 Nov 2022 13:36:07 -0700 Subject: [PATCH] Fix #664. Bad line in inner ring response --- go.mod | 2 +- go.sum | 4 ++-- internal/collection/string.go | 4 ++++ tests/keys_test.go | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c956d681..5ab49b57 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/tidwall/btree v1.1.0 github.com/tidwall/buntdb v1.2.9 github.com/tidwall/geoindex v1.4.4 - github.com/tidwall/geojson v1.3.4 + github.com/tidwall/geojson v1.4.2 github.com/tidwall/gjson v1.12.1 github.com/tidwall/match v1.1.1 github.com/tidwall/pretty v1.2.0 diff --git a/go.sum b/go.sum index ec250d65..8667eda8 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ github.com/tidwall/cities v0.1.0 h1:CVNkmMf7NEC9Bvokf5GoSsArHCKRMTgLuubRTHnH0mE= github.com/tidwall/cities v0.1.0/go.mod h1:lV/HDp2gCcRcHJWqgt6Di54GiDrTZwh1aG2ZUPNbqa4= github.com/tidwall/geoindex v1.4.4 h1:hdwzy5qNtK75i7nus59Ibr+SwcH4F2v65bw4txrLJ9M= github.com/tidwall/geoindex v1.4.4/go.mod h1:rvVVNEFfkJVWGUdEfU8QaoOg/9zFX0h9ofWzA60mz1I= -github.com/tidwall/geojson v1.3.4 h1:mHB2yGK7HPgf4vFkLdPeIzguFpqkmCT2yTgGhXbrqBo= -github.com/tidwall/geojson v1.3.4/go.mod h1:1cn3UWfSYCJOq53NZoQ9rirdw89+DM0vw+ZOAVvuReg= +github.com/tidwall/geojson v1.4.2 h1:foR+7MWweUPLcFI8oWMTHp22Qkc7XHRJo15e9rCnv64= +github.com/tidwall/geojson v1.4.2/go.mod h1:1cn3UWfSYCJOq53NZoQ9rirdw89+DM0vw+ZOAVvuReg= github.com/tidwall/gjson v1.12.1 h1:ikuZsLdhr8Ws0IdROXUS1Gi4v9Z4pGqpX/CvJkxvfpo= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/grect v0.1.4 h1:dA3oIgNgWdSspFzn1kS4S/RDpZFLrIxAZOdJKjYapOg= diff --git a/internal/collection/string.go b/internal/collection/string.go index ad7dc042..c2de3fea 100644 --- a/internal/collection/string.go +++ b/internal/collection/string.go @@ -87,3 +87,7 @@ func (s String) NumPoints() int { func (s String) Distance(obj geojson.Object) float64 { return 0 } + +func (s String) Members() string { + return "" +} diff --git a/tests/keys_test.go b/tests/keys_test.go index 0170ca27..26ff0d77 100644 --- a/tests/keys_test.go +++ b/tests/keys_test.go @@ -197,7 +197,7 @@ func keys_SET_test(mc *mockServer) error { {"SET", "mykey", "myid", "BOUNDS", 33, -115, 33, -115}, {"OK"}, {"GET", "mykey", "myid", "POINT"}, {"[33 -115]"}, {"GET", "mykey", "myid", "BOUNDS"}, {"[[33 -115] [33 -115]]"}, - {"GET", "mykey", "myid", "OBJECT"}, {`{"type":"Polygon","coordinates":[[[-115,33],[-115,33],[-115,33],[-115,33],[-115,33]]]}`}, + {"GET", "mykey", "myid", "OBJECT"}, {`{"type":"Point","coordinates":[-115,33]}`}, {"GET", "mykey", "myid", "HASH", 7}, {"9my5xp7"}, {"DEL", "mykey", "myid"}, {"1"}, {"GET", "mykey", "myid"}, {nil},