Fix index and slice expressions for query (#405)

* Fix index and slice expressions for query

Support negative step for slice expressions
This commit is contained in:
x-hgg-x
2020-05-14 08:21:51 +02:00
committed by GitHub
parent 44aed552fd
commit a60e466129
8 changed files with 601 additions and 182 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ Or use a query:
q, _ := query.Compile("$..[user,password]")
results := q.Execute(config)
for ii, item := range results.Values() {
fmt.Println("Query result %d: %v", ii, item)
fmt.Printf("Query result %d: %v\n", ii, item)
}
```
@@ -99,9 +99,9 @@ Go-toml provides two handy command line tools:
go install github.com/pelletier/go-toml/cmd/tomljson
tomljson --help
```
* `jsontoml`: Reads a JSON file and outputs a TOML representation.
```
go install github.com/pelletier/go-toml/cmd/jsontoml
jsontoml --help