aboutsummaryrefslogtreecommitdiff
path: root/weed/query/json
diff options
context:
space:
mode:
Diffstat (limited to 'weed/query/json')
-rw-r--r--weed/query/json/query_json.go2
-rw-r--r--weed/query/json/query_json_test.go7
2 files changed, 3 insertions, 6 deletions
diff --git a/weed/query/json/query_json.go b/weed/query/json/query_json.go
index b061df97d..46f3b1b56 100644
--- a/weed/query/json/query_json.go
+++ b/weed/query/json/query_json.go
@@ -26,7 +26,7 @@ func QueryJson(jsonLine string, projections []string, query Query) (passedFilter
return false, nil
}
-func filterJson(jsonLine string, query Query) bool{
+func filterJson(jsonLine string, query Query) bool {
value := gjson.Get(jsonLine, query.Field)
diff --git a/weed/query/json/query_json_test.go b/weed/query/json/query_json_test.go
index 621d4f548..1794bb333 100644
--- a/weed/query/json/query_json_test.go
+++ b/weed/query/json/query_json_test.go
@@ -55,9 +55,9 @@ func TestGjson(t *testing.T) {
`
- projections := []string{"quiz","fruit"}
+ projections := []string{"quiz", "fruit"}
- gjson.ForEachLine(data, func(line gjson.Result) bool{
+ gjson.ForEachLine(data, func(line gjson.Result) bool {
println(line.Raw)
println("+++++++++++")
results := gjson.GetMany(line.Raw, projections...)
@@ -68,8 +68,6 @@ func TestGjson(t *testing.T) {
return true
})
-
-
}
func TestJsonQueryRow(t *testing.T) {
@@ -133,4 +131,3 @@ func TestJsonQueryNumber(t *testing.T) {
println(string(buf))
}
-