summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-08Merge pull request #50 from kenshaw/add-single-notrunc-optsAlex Flint
Adding single and notrunc tag options
2017-03-08readme updateMario Hros
2017-03-08nicer usage outputMario Hros
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
2017-02-22Merge pull request #48 from alexflint/parse_hyphenAlex Flint
deal with "-" as option value
2017-02-21deal with "-" as option valueAlex Flint
2017-02-17Merge pull request #46 from alexflint/vendoringAlex Flint
vendor in dependencies
2017-02-15deal with booleans correctlyAlex Flint
2017-02-15put comment backAlex Flint
2017-02-15use go-scalar, vendoringAlex Flint
2017-02-09Merge pull request #45 from alexflint/empty_argsAlex Flint
Do not crash when os.Args is empty
2017-02-09fix case where os.Args is emptyAlex Flint
2017-02-09Merge pull request #43 from mnsmar/masterAlex Flint
print description in help message, not in usage
2017-02-08print description in help message, not in usageEmmanouil "Manolis" Maragkakis
2017-01-24Merge pull request #41 from mnsmar/masterAlex Flint
add support for description string
2017-01-23add support for description stringEmmanouil "Manolis" Maragkakis
2016-10-11Merge pull request #39 from alexflint/embeddedAlex Flint
add support for embedded structs
2016-10-10add not on embedding to readmeAlex Flint
2016-10-10add support for embedded structsAlex Flint
2016-09-13Merge pull request #38 from alexflint/version_stringAlex Flint
Add support for version strings
2016-09-08add to readmeAlex Flint
2016-09-08add support for version stringAlex Flint
2016-07-31Merge pull request #36 from alexflint/add_goreportcard_readmeAlex Flint
Add goreportcard to README.md
2016-07-31add goreportcard to readme.mdAlex Flint
2016-07-31Merge pull request #35 from alexflint/fix_example_namesAlex Flint
fix example function names
2016-07-31fix example function namesAlex Flint
2016-03-06Merge pull request #34 from walle/defaults_for_multipleAlex Flint
Print defaults for multiples
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-03-04Merge pull request #33 from walle/multipleAlex Flint
Defaults for multiples, intended behaviour
2016-02-29Allow override of defaults for slice argumentsFredrik Wallgren
This commit fixes a bug where if a multiple value argument (slice) has default values, the submitted values will be appended to the default. Not overriding them as expected.
2016-02-22Merge pull request #32 from alexflint/override_program_nameAlex Flint
make it possible to override the name of the program
2016-01-23Merge pull request #31 from alexflint/parse_ip_mac_and_emailAlex Flint
Parse IP addresses, MAC addresses, and email addresses
2016-01-23Merge remote-tracking branch 'origin/master' into parse_ip_mac_and_emailAlex Flint
2016-01-23Merge pull request #30 from alexflint/scalar_pointersAlex Flint
add support for pointers and TextUnmarshaler
2016-01-23added tests for MAC and email addressesAlex Flint
2016-01-23added tests for IP address parsingAlex Flint
2016-01-23add support for IP address, email address, and MAC addressAlex Flint
2016-01-23move installation instructions to topAlex Flint
2016-01-23update readme with new additionsAlex Flint
2016-01-23Merge remote-tracking branch 'origin/master' into scalar_pointersAlex Flint
2016-01-23Merge pull request #29 from alexflint/parse_durationAlex Flint
Add support for time.Duration fields
2016-01-23add support for pointers and TextUnmarshalerAlex Flint
2016-01-23add test for invalid durationsAlex Flint
2016-01-23add support for time.Duration fieldsAlex Flint
2016-01-18Merge pull request #9 from brettlangdon/dev/environment.variables.sqwishedAlex Flint
Add support for environment variables
2016-01-18Add support for environment variablesbrettlangdon
2016-01-18make it possible to override the name of the programAlex Flint
2016-01-18Merge pull request #26 from alexflint/brettlangdon-dev/positional.help.sqwishedAlex Flint
Resolve some merge conflicts from #8
2016-01-18extract common colWidth constantAlex Flint
2016-01-18resolve mergeAlex Flint