This is a simple library for converting query strings to mongo queries using Go's AST parser.
Checkout the repository and run:
go get github.com/qwerty-iot/mongoq
import "github.com/qwerty-iot/mongoq"
query, _ := mongoq.ParseQuery("name == Andrew && age >= 5")
fmt.Println("%v\n", query)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.