mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
Update cobra.pflag
This commit is contained in:
parent
d577db9987
commit
96b054eb50
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -396,7 +396,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/spf13/pflag",
|
||||
"Rev": "11b7cf8387a31f278486eaad758162830eca8c73"
|
||||
"Rev": "18d831e92d67eafd1b0db8af9ffddbd04f7ae1f4"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/stretchr/objx",
|
||||
|
3
Godeps/_workspace/src/github.com/spf13/pflag/flag.go
generated
vendored
3
Godeps/_workspace/src/github.com/spf13/pflag/flag.go
generated
vendored
@ -147,6 +147,7 @@ type Flag struct {
|
||||
Value Value // value as set
|
||||
DefValue string // default value (as text); for usage message
|
||||
Changed bool // If the user set the value (or if left to default)
|
||||
Annotations map[string][]string // used by cobra.Command bash autocomple code
|
||||
}
|
||||
|
||||
// Value is the interface to the dynamic value stored in a flag.
|
||||
@ -358,7 +359,7 @@ func (f *FlagSet) Var(value Value, name string, usage string) {
|
||||
// Like Var, but accepts a shorthand letter that can be used after a single dash.
|
||||
func (f *FlagSet) VarP(value Value, name, shorthand, usage string) {
|
||||
// Remember the default value as a string; it won't change.
|
||||
flag := &Flag{name, shorthand, usage, value, value.String(), false}
|
||||
flag := &Flag{name, shorthand, usage, value, value.String(), false, make(map[string][]string)}
|
||||
f.AddFlag(flag)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user