Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
If you would like to use a variable number of arguments at the end of your program without the user specifying --
before the list, you can do this by setting flaggy.ShowHelpOnUnexpectedDisable()
and then parsing the []string
at flaggy.TrailingArguments
. For more details, see Issue #79
Full Changelog: https://github.com/integrii/flaggy/compare/v1.5.0...v1.5.1
Important! A build error snuck into this release. Please use v1.5.1!
TrailingSubcommand()
method to find the last subcommand used by parsers @mattwiller in https://github.com/integrii/flaggy/pull/75
Full Changelog: https://github.com/integrii/flaggy/compare/v1.4.4...v1.5.0
ShowHelpOnUnexpected breaking
when go test
is run.Thanks to @ravenpride for his help with this one.
flaggy.DefaultParser.ShowHelpOnUnexpected()
now properly throws an error when unexpected arguments are passed from the command lineThis release contains only polish and documentation.