Command line parsing mess
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Dan Buch c93d1cd4f0
Playing with terribly benchmarks
4 weeks ago
cmd/argh-example Declare correct module name 1 month ago
.gitignore Reduce required args to new parser 2 months ago
Makefile Add a Makefile and update/alter deps 1 month ago
README.md A bit more coverage + say things in README 1 month ago
argh.go Handle remaining skipped cases 3 months ago
argh_test.go Playing with terribly benchmarks 4 weeks ago
go.mod Add a Makefile and update/alter deps 1 month ago
go.sum Add a Makefile and update/alter deps 1 month ago
node.go Handle remaining skipped cases 3 months ago
nvalue_string.go Handle bare assignments as syntax error + NValue rework 3 months ago
parser.go Pointers and nils again 2 months ago
parser_config.go Pointers and nils again 2 months ago
parser_error.go Renaming some error list bits & testing windows-like 3 months ago
parser_test.go Declare correct module name 1 month ago
querier.go Use parser2 in querier tests 3 months ago
querier_test.go Declare correct module name 1 month ago
scanner.go Continuing the work with parser that's more like go/parser 3 months ago
scanner_config.go Continuing the work with parser that's more like go/parser 3 months ago
scanner_test.go A bit more coverage + say things in README 1 month ago
token.go Continuing the work with parser that's more like go/parser 3 months ago
token_string.go Making a mess with a parser that works more like go/parser 3 months ago

README.md

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