summaryrefslogtreecommitdiff
path: root/usage_test.go
AgeCommit message (Collapse)Author
2020-04-03clean up extraneous test outputAlex Flint
2020-03-01add Config.IgnoreEnv to ignore environment variablesAlex Flint
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.
2019-10-19store default values during NewParserAlex Flint
2019-04-04add golangci badge, and fix some lint issues found by the toolAlex Flint
2018-04-16fixed example comment, test coverage issueWlazlo, Matt
2018-04-13Custom parsers implementing encoding.TextMarshaler() can have default values ↵Wlazlo, Matt
printed via --help
2017-10-02Further clarificationRick
2017-10-02Altered help tag parsing to reduce the constraints on help text content; old ↵Rick
behaviour is retained for backward compatibility
2017-03-30testsMario Hros
2017-03-08nicer usage outputMario Hros
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-18Add support for environment variablesbrettlangdon
2016-01-18make it possible to override the name of the programAlex 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-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-07Remove excess trailing whitespace from Usage generationbrettlangdon
2015-11-04add tests for usage infoAlex Flint