Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
I want to get the default help closer to the help output of Cobra a little more. Specifically the Usage section. This is challenging because Flaggy allows for even more use patterns than cobra does and we don't want output to hide that.
Sample help from Cobra:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.
Usage:
cobra [command]
Available Commands:
add Add a command to a Cobra Application
help Help about any command
init Initialize a Cobra Application
Flags:
-a, --author string author name for copyright attribution (default "YOUR NAME")
--config string config file (default is $HOME/.cobra.yaml)
-h, --help help for cobra
-l, --license string name of license for the project
--viper use Viper for configuration (default true)
Use "cobra [command] --help" for more information about a command.
I want to get the default help closer to the help output of Cobra a little more. Specifically the Usage section. This is challenging because Flaggy allows for even more use patterns than cobra does and we don't want output to hide that.
Sample help from Cobra: