I have repeatedly mistaken to use tools/parse because I have forgotten Go flag behavior.
I think it is better to print usages when there are flags after positional parameter.
Current behavior
# -dig and -pos are ignored
$ go run ./tools/parse/main.go "SELECT 1 AS x" -dig "Query.Results.0" -pos "As.end"
Fixed behavior
$ go run ./tools/parse/main.go "SELECT 1 AS x" -dig "Query.Results.0" -pos "As.end"
Usage of tools/parse.go
A testing tool for parsing Spanner SQL.
Example:
...
I have repeatedly mistaken to use
tools/parse
because I have forgotten Goflag
behavior. I think it is better to print usages when there are flags after positional parameter.Current behavior
Fixed behavior