Skip to content

Commit 89fc6c5

Browse files
author
崔竞宁
committed
feat: update readme to give ast content
1 parent 2113506 commit 89fc6c5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# go-querystring-parser
2-
A golang querystring parser
2+
A golang Elasticsearch Querystring parser
33

44
## Usage
55

@@ -21,6 +21,25 @@ if err != nil {
2121
// do something with ast
2222
```
2323

24+
The AST parsed from above querystring:
25+
26+
```
27+
// print via github.com/davecgh/go-spew.Dump
28+
(*querystring.AndCondition)(0xc00000c200)({
29+
Left: (*querystring.MatchCondition)(0xc00000c1e0)({
30+
Field: (string) (len=7) "message",
31+
Value: (string) (len=10) "test value"
32+
}),
33+
Right: (*querystring.TimeRangeCondition)(0xc000076750)({
34+
Field: (string) (len=8) "datetime",
35+
Start: (*string)(0xc0000545b0)((len=19) "2020-01-01T00:00:00"),
36+
End: (*string)(0xc0000545c0)((len=19) "2020-12-31T00:00:00"),
37+
IncludeStart: (bool) true,
38+
IncludeEnd: (bool) true
39+
})
40+
})
41+
```
42+
2443
## For Developers
2544

2645
After edit querystring.y, gen code via run:

0 commit comments

Comments
 (0)