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.
 
 
Go to file
Dan Buch 871b7aa4f0
Collapse together Command and Flag into CommandFlag
1 year ago
cmd/argh-example Add support for "event"-like interface to parsing 1 year ago
.gitignore Reduce required args to new parser 2 years ago
Makefile Add support for "event"-like interface to parsing 1 year ago
README.md Add support for "event"-like interface to parsing 1 year ago
argh.go Add support for "event"-like interface to parsing 1 year ago
argh_test.go Collapse together Command and Flag into CommandFlag 1 year ago
ast.go Collapse together Command and Flag into CommandFlag 1 year ago
go.mod Add a Makefile and update/alter deps 2 years ago
go.sum Add a Makefile and update/alter deps 2 years ago
node.go Collapse together Command and Flag into CommandFlag 1 year ago
nvalue_string.go Handle bare assignments as syntax error + NValue rework 2 years ago
parser.go Collapse together Command and Flag into CommandFlag 1 year ago
parser_config.go Collapse together Command and Flag into CommandFlag 1 year ago
parser_error.go Renaming some error list bits & testing windows-like 2 years ago
parser_test.go Collapse together Command and Flag into CommandFlag 1 year ago
scanner.go Continuing the work with parser that's more like go/parser 2 years ago
scanner_config.go Continuing the work with parser that's more like go/parser 2 years ago
scanner_test.go A bit more coverage + say things in README 2 years ago
token.go Continuing the work with parser that's more like go/parser 2 years ago
token_string.go Making a mess with a parser that works more like go/parser 2 years 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
  • support event-like reactive parsing