summaryrefslogtreecommitdiff
path: root/example_test.go
AgeCommit message (Collapse)Author
2024-06-30Fix testable example output comment formattingHugo Hromic
2024-06-27Fix crash on errors in package-level `MustParse`Hugo Hromic
2023-06-03fixed testsPablo Diaz
2023-06-03added tests and fixed usagePablo Diaz
2023-06-03ignores short and long parametersPablo Diaz
2023-02-08clean up customizable stdout, stderr, and exit in parser configAlex Flint
2022-02-09fix bracketing for non-required positionalsAlex Flint
2021-09-18Merge remote-tracking branch 'origin/master' into usage-for-subcommandsAlex Flint
2021-08-20bump go-scalar to v1.1 and add documentation about supported typesAlex Flint
2021-05-09add FailSubcommand, WriteUsageForSubcommand, WriteHelpForSubcommandAlex Flint
2021-04-20fix the mappings-with-commas exampleAlex Flint
2021-04-19updated the example for mappings with commasAlex Flint
2021-04-19test coverage 100% !!Alex Flint
2021-04-19add an runnable example for mappingsAlex Flint
2020-08-06add documentation and examples showing how to override the short and long ↵Alex Flint
option names together
2020-01-25Print global options in help for subcommandsDylan Allbee
fixes #101
2020-01-19usage: if the program supports subcommands, mention itMarco Molteni
2019-11-30Final improvementsAndrew Morozko
2019-11-30Various changesAndrew Morozko
2019-11-29Added the "dataname" tagAndrew Morozko
2019-10-21update documentation to new way of specifying defaultsAlex Flint
2019-08-06add subcommands to readmeAlex Flint
2019-05-03print help and usage at subcommand level if necessaryAlex Flint
2019-05-03add subcommands to usage stringAlex Flint
2019-05-03add expected output for usage exampleAlex Flint
2019-05-03add expected outputs to all examplesAlex Flint
2017-03-04Adding separate tag optionKenneth Shaw
As outlined in #49, there is a need to mimic the behavior of other applications by interweaving positional and non-positional parameters. This change adds the 'separate' option that will force a arg of type []string to only read the next supplied value. For example, when dealing with the following arg type: var MyArgs struct { Pos []string `arg:"positional"` Separate []string `arg:"-s,separate"` } This commit will parse the following command line: ./app pos1 pos2 -s=separate1 -s=separate2 pos3 -s=separate3 pos4 Such that MyArgs.Pos will be [pos1 pos2 pos3 pos4] and MyArgs.Separate will be [separate1 separate2 separate3]. Unit tests for the above have also been written and are included in this commit, as well as the addition of a section to README.md and an example func in example_test.go. Fixes #49
2016-07-31fix example function namesAlex Flint
2015-11-01fix examplesAlex Flint
2015-11-01add .travis.ymlAlex Flint
2015-11-01added runnable examplesAlex Flint