Command line parsing mess
Go to file
2022-11-08 20:47:01 -05:00
cmd/argh-example Add support for "event"-like interface to parsing 2022-11-08 19:26:23 -05:00
.gitignore Reduce required args to new parser 2022-06-06 19:06:50 -04:00
argh_test.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
argh.go Add support for "event"-like interface to parsing 2022-11-08 19:26:23 -05:00
ast.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
go.mod Add a Makefile and update/alter deps 2022-07-16 10:22:47 -04:00
go.sum Add a Makefile and update/alter deps 2022-07-16 10:22:47 -04:00
Makefile Add support for "event"-like interface to parsing 2022-11-08 19:26:23 -05:00
node.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
nvalue_string.go Handle bare assignments as syntax error + NValue rework 2022-05-16 08:24:24 -04:00
parser_config.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
parser_error.go Renaming some error list bits & testing windows-like 2022-05-29 21:12:57 -04:00
parser_test.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
parser.go Collapse together Command and Flag into CommandFlag 2022-11-08 20:47:01 -05:00
README.md Add support for "event"-like interface to parsing 2022-11-08 19:26:23 -05:00
scanner_config.go Continuing the work with parser that's more like go/parser 2022-05-22 20:49:11 -04:00
scanner_test.go A bit more coverage + say things in README 2022-07-10 17:36:13 -04:00
scanner.go Continuing the work with parser that's more like go/parser 2022-05-22 20:49:11 -04:00
token_string.go Making a mess with a parser that works more like go/parser 2022-05-22 08:47:45 -04:00
token.go Continuing the work with parser that's more like go/parser 2022-05-22 20:49:11 -04:00

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
  • support event-like reactive parsing