Command line parsing mess
cmd/argh-example | ||
.gitignore | ||
argh.go | ||
go.mod | ||
go.sum | ||
node.go | ||
nvalue_string.go | ||
parser_config.go | ||
parser_error.go | ||
parser_test.go | ||
parser.go | ||
querier_test.go | ||
querier.go | ||
README.md | ||
scanner_config.go | ||
scanner_test.go | ||
scanner.go | ||
token_string.go | ||
token.go |
argh command line parser
background
The Go standard library flag way of doing things has long been a source of frustration while implementing and maintaining the urfave/cli library. Many alternate parsers exist, including:
In addition to these other implementations, I also got some help via this oldie and the Go standard library parser.
goals
- get a better understanding of the whole problem space
- support both POSIX-y and Windows-y styles
- build a printable/JSON-able parse tree
- support rich error reporting