Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
For use cases where only the final subcommand in the sequence needs to be run
(e.g. git remote add just runs the add subcommand of remote), it would be
useful to identify that subcommand directly. Since that pointer is already
helpfully stored in the parser, simply exposing it via a method worked nicely.
For use cases where only the final subcommand in the sequence needs to be run (e.g.
git remote add
just runs theadd
subcommand ofremote
), it would be useful to identify that subcommand directly. Since that pointer is already helpfully stored in the parser, simply exposing it via a method worked nicely.