From baf7141d1dd0f99d561a2197a909c66dd389809d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 8 Oct 2016 16:02:50 -0500 Subject: Update dependencies --- vendor/github.com/spf13/pflag/flag.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'vendor/github.com/spf13/pflag/flag.go') diff --git a/vendor/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go index eb143d7..4258f45 100644 --- a/vendor/github.com/spf13/pflag/flag.go +++ b/vendor/github.com/spf13/pflag/flag.go @@ -416,7 +416,7 @@ func Set(name, value string) error { // otherwise, the default values of all defined flags in the set. func (f *FlagSet) PrintDefaults() { usages := f.FlagUsages() - fmt.Fprintf(f.out(), "%s", usages) + fmt.Fprint(f.out(), usages) } // defaultIsZeroValue returns true if the default value for this flag represents @@ -434,10 +434,20 @@ func (f *Flag) defaultIsZeroValue() bool { return f.DefValue == "" case *ipValue, *ipMaskValue, *ipNetValue: return f.DefValue == "" - case *intSliceValue, *stringSliceValue: + case *intSliceValue, *stringSliceValue, *stringArrayValue: return f.DefValue == "[]" default: - return true + switch f.Value.String() { + case "false": + return true + case "": + return true + case "": + return true + case "0": + return true + } + return false } } -- cgit v1.2.3