summaryrefslogtreecommitdiff
path: root/usage.go
AgeCommit message (Collapse)Author
2021-04-19test coverage 100% !!Alex Flint
2021-04-19change "kind" to "cardinality", add support for maps to parserAlex Flint
2021-04-16Merge pull request #137 from alexflint/optional-longAlex Flint
Optional long names
2021-04-08refactor: remove unused functionLeoZhan
2021-01-31test that short-only options are printed first in the help messageAlex Flint
2020-12-20Skip right column if the left is emptyAndrew Morozko
2020-12-20Optional long argumentsAndrew Morozko
2020-06-03feat(usage): Include env variable in usageDenys Vitali
2020-01-25Fix lint warningsDylan Allbee
2020-01-25Use command passed into p.Parse(...) write methodsDylan Allbee
It is currently impossible to programatically write help and usage messages for subcommands, due to parser.WriteHelp and parser.WriteUsage not taking the state of the parser into account. Check for the existence of p.lastCmd and use it for the writers when available. Enables ability to write unit tests for subcommand help.
2020-01-25Print global options in help for subcommandsDylan Allbee
fixes #101
2020-01-23address review commentsMarco Molteni
2020-01-19usage: if the program supports subcommands, mention itMarco Molteni
2019-11-30Various changesAndrew Morozko
2019-11-29Added the "dataname" tagAndrew Morozko
2019-10-19store default values during NewParserAlex Flint
2019-05-03no need to initialize nil structs during path traversalAlex Flint
2019-05-03simplify Fprint callAlex Flint
2019-05-03print help and usage at subcommand level if necessaryAlex Flint
2019-05-03add subcommands to usage stringAlex Flint
2019-04-30introduced path structAlex Flint
2019-04-30rename get/settable to readable/writableAlex Flint
2019-04-30minor reformatAlex Flint
2019-04-14all tests passing againAlex Flint
2019-04-14refactor validationAlex Flint
2018-04-13Custom parsers implementing encoding.TextMarshaler() can have default values ↵Wlazlo, Matt
printed via --help
2017-03-30required positional argsMario Hros
2017-03-08nicer usage outputMario Hros
2017-02-08print description in help message, not in usageEmmanouil "Manolis" Maragkakis
2017-01-23add support for description stringEmmanouil "Manolis" Maragkakis
2016-09-08add support for version stringAlex Flint
2016-03-06Print defaults for multiplesFredrik Wallgren
Check if the default value supplied is a slice and not nil, if so print the list of values supplied. Test case for slice argument with and without default values. Default values for slices was not printed because slice is not comparable, but the zero value for slices is nil.
2016-02-22Merge pull request #32 from alexflint/override_program_nameAlex Flint
make it possible to override the name of the program
2016-01-23add support for IP address, email address, and MAC addressAlex Flint
2016-01-18make it possible to override the name of the programAlex Flint
2016-01-18extract common colWidth constantAlex Flint
2016-01-18resolve mergeAlex Flint
2015-12-04Fix error when printing usage for multi-value argumentsAlex Rakoczy
We try to compare []strings, which are uncomparable types: `panic: runtime error: comparing uncomparable type []string`
2015-11-22Fix merge conflictsFredrik Wallgren
2015-11-21Display help text for positional argumentsbrettlangdon
2015-11-22Add default values to usageFredrik Wallgren
Check if the value isn't it's zero value and if not add a default value to the usage text.
2015-11-16Add built ins to options in help outputFredrik Wallgren
Adds help to the options in help output with an easy way to add more built ins.
2015-11-11Merge pull request #14 from walle/usage_on_stderr_bugAlex Flint
Fix bug with error not being written to stderr
2015-11-11Fix lint warningFredrik Wallgren
2015-11-11Fix bug with error not being written to stderrFredrik Wallgren
Only the usage message was written to stderr, the error was written with the standard fmt.Println.
2015-11-09Merge pull request #10 from walle/fail_to_stderrAlex Flint
Write usage message to stderr on error
2015-11-09Write usage message to stderr on errorFredrik Wallgren
When the parsing of parameters/flags fails eg. when a required flag is missing, print the usage statement and error to stderr instead of stdout.
2015-11-07Remove excess trailing whitespace from Usage generationbrettlangdon
2015-11-04add tests for usage infoAlex Flint
2015-11-01separate help into WriteUsage and WriteHelpAlex Flint