aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-19Merge pull request #102 from bogem/redundantEric Paris
Clean up code
2017-01-16Merge pull request #110 from hardikbagdi/masterEric Paris
add badges to README.md
2017-01-16add badges to README.mdHardik Bagdi
2017-01-15Merge pull request #107 from xilabao/add-user-supplied-func-when-parseEric Paris
add user supplied function when parse()
2017-01-16Make command line parsing available outside pflagxilabao
We basically want to allow callers to use our command line parser. There is a user who wants to log the command line, but they don't want to log "sensitive" flags. This allows that user to parse the command line and get each flag. They can use information in the flag to write their own printer.
2016-12-13Merge pull request #109 from SinghamXiao/masterEric Paris
not enough arguments in call to flag.BoolVarP and too many arguments in call to flag.VarP
2016-12-14too many argumentsyuanxiao
Signed-off-by: yuanxiao <[email protected]>
2016-10-24Remove Go 1.5 from TravisBjørn Erik Pedersen
Fails to go get golint. Also bump Go 1.7 to 1.7.3
2016-10-23Clean up codebogem
2016-10-18Merge pull request #101 from dnephin/fix-default-value-of-stringEric Paris
Don't print escaped strings for the default value of string
2016-10-18Don't print escaped strings for the default value of string flags with a ↵Daniel Nephin
default is set. Signed-off-by: Daniel Nephin <[email protected]>
2016-10-18Merge pull request #100 from dnephin/dont-escape-windows-pathsEric Paris
Don't print escaped strings for the default value of string flags.
2016-10-18Don't print escaped strings for the default value of string flags.Daniel Nephin
Signed-off-by: Daniel Nephin <[email protected]>
2016-10-11Merge pull request #99 from mmilata/string-array-square-bracketsEric Paris
Fix square bracket handling in string_array
2016-10-11Fix square bracket handling in string_arrayMartin Milata
Same issue fixed in 13e924de for string_slice.
2016-10-06Merge pull request #98 from shenwei356/masterEric Paris
fix bug of string_slice with square brackets
2016-10-07fix bug of string_slice with square bracketsshenwei356
2016-10-05Merge pull request #94 from bogem/noverbsEric Paris
Optimize fmt statements
2016-09-25Optimize fmt statementsbogem
2016-09-15Merge pull request #93 from bogem/flagStringsEric Paris
Use strconv instead of fmt in some values' String funcs
2016-09-11Merge pull request #92 from moorereason/iss91Eric Paris
Fix default values for custom fields
2016-09-10Use strconv instead of fmt in values' String funcsbogem
The existing implementation of flag values with fmt package uses more memory and works slower than the implementation with strconv package.
2016-09-09Fix default values for custom fieldsCameron Moore
Fallback to the original default detection logic if we have an unknown type. Fixes #91
2016-09-06Merge pull request #90 from wu8685/string_arrayEric Paris
add a new type StringArray
2016-09-06add a new type StringArraywu8685
2016-08-20Merge pull request #88 from bogem/fixesEric Paris
Some minor fixes
2016-08-20Add check of error in int slice testbogem
2016-08-20Fix verbs for *bool in bool testbogem
2016-08-19Merge pull request #82 from wu8685/comma-in-string-sliceEric Paris
Fix bug in FlagSet.GetStringSlice when a comma in a string slice value
2016-08-19Fix bug in FlagSet.GetStringSlice when a comma in a string slice valuewu8685
2016-08-16Merge pull request #78 from moorereason/go1.7-zerovaluesEric Paris
Fix default value detection for Go 1.7
2016-08-16Update travis configCameron Moore
2016-08-16Refactor default value detectionCameron Moore
In Go 1.7 the default value for a time.Duration will change from "0" to "0s". This commit replaces the simplistic `isZeroValue` with a more intelligent implementation that checks for zero values based upon the specific type of the flag.
2016-08-15Merge pull request #85 from bogem/usageEric Paris
Use flag's string type in usage
2016-08-14Use flag's string type in usagebogem
Now in usage shows flag.Value.Type() instead of flag.Value.(type), what makes library more flexible
2016-08-04Merge pull request #84 from apelisse/fix-empty-string-sliceEric Paris
Fix string_slice with empty value
2016-08-03Fix string_slice with empty valueAntoine Pelisse
Currently, if you don't set any value for a StringSliceVar, it will end-up failing with an EOF error. It fails because the CSV parser for the value can't read anything. Special case when the string is empty to return an empty list.
2016-07-18Bump Go versions in Travis configBjørn Erik Pedersen
2016-06-24Removed unused field "exitOnError".Jonathan Barronville
2016-06-10Merge pull request #74 from alexbrand/masterEric Paris
Document AddGoFlagSet method in the README file
2016-06-09Document AddGoFlagSet method in the README fileAlexander Brand
2016-04-27Passthrough flags inserted by go testMoshe Cohen
2016-04-27Fix a typo in READMEJake Worth
2016-04-13Merge pull request #67 from johnSchnake/availableFlagsEric Paris
Add simple method to see if a flagset has available flags
2016-04-11Add simple method to see if a flagset has available flagsJohn Schnake
With the hidden and deprecated fields, it is useful to be able to ask if a flagset has any non-hdden, non-deprecated flags. One example of this is to aid in writing help templates.
2016-04-11Merge pull request #69 from johnSchnake/travisUpdateEric Paris
Remove go 1.3 and 1.4 from travis; add 1.6
2016-04-11Remove go 1.3 and 1.4 from travis; add 1.6John Schnake
Due to the age of 1.3 and 1.4, removing them from travis. They currently are incompatible with golint as well, meaning that we, otherwise, need to remove golint in testing.
2015-12-18Issue #55: implement Go 1.5-style default usage formatting.Giovanni Bajo
Compare to 1.4, the main difference in formatting is the placement of default values. Moreover, UnquoteUsage() is now added (and exported, for full API compatibility with the standard flag package), so backtick words in usage messages can be used to set the placeholder name. Compared to the standard flag package, this patch always prints usage in one-line, with automatic alignment, because I feel that the 1.4 output is very confusing when modified to include also dash-dash flags.
2015-12-18Better support golang flag short valuesEric Paris
In golang flags -bob and --bob are the same thing. Not so in pflags. But when a golang flag was just -b or --b we would still only support --b. This was a little awkward to users. If a golang flag was declared as a single character, support both the -b and --b versions in the pflag version.
2015-10-13Merge pull request #59 from eparis/csv-escapingEric Paris
Use encoding/csv to parse string slices