Upgrade k8s.io/client-go to version 2
This commit is contained in:
parent
a3b95f798b
commit
6f4c5dd4ce
675 changed files with 109006 additions and 90744 deletions
25
vendor/github.com/spf13/pflag/string.go
generated
vendored
25
vendor/github.com/spf13/pflag/string.go
generated
vendored
|
@ -1,7 +1,5 @@
|
|||
package pflag
|
||||
|
||||
import "fmt"
|
||||
|
||||
// -- string Value
|
||||
type stringValue string
|
||||
|
||||
|
@ -18,7 +16,20 @@ func (s *stringValue) Type() string {
|
|||
return "string"
|
||||
}
|
||||
|
||||
func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) }
|
||||
func (s *stringValue) String() string { return string(*s) }
|
||||
|
||||
func stringConv(sval string) (interface{}, error) {
|
||||
return sval, nil
|
||||
}
|
||||
|
||||
// GetString return the string value of a flag with the given name
|
||||
func (f *FlagSet) GetString(name string) (string, error) {
|
||||
val, err := f.getFlagType(name, "string", stringConv)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return val.(string), nil
|
||||
}
|
||||
|
||||
// StringVar defines a string flag with specified name, default value, and usage string.
|
||||
// The argument p points to a string variable in which to store the value of the flag.
|
||||
|
@ -26,7 +37,7 @@ func (f *FlagSet) StringVar(p *string, name string, value string, usage string)
|
|||
f.VarP(newStringValue(value, p), name, "", usage)
|
||||
}
|
||||
|
||||
// Like StringVar, but accepts a shorthand letter that can be used after a single dash.
|
||||
// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
|
||||
func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) {
|
||||
f.VarP(newStringValue(value, p), name, shorthand, usage)
|
||||
}
|
||||
|
@ -37,7 +48,7 @@ func StringVar(p *string, name string, value string, usage string) {
|
|||
CommandLine.VarP(newStringValue(value, p), name, "", usage)
|
||||
}
|
||||
|
||||
// Like StringVar, but accepts a shorthand letter that can be used after a single dash.
|
||||
// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
|
||||
func StringVarP(p *string, name, shorthand string, value string, usage string) {
|
||||
CommandLine.VarP(newStringValue(value, p), name, shorthand, usage)
|
||||
}
|
||||
|
@ -50,7 +61,7 @@ func (f *FlagSet) String(name string, value string, usage string) *string {
|
|||
return p
|
||||
}
|
||||
|
||||
// Like String, but accepts a shorthand letter that can be used after a single dash.
|
||||
// StringP is like String, but accepts a shorthand letter that can be used after a single dash.
|
||||
func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string {
|
||||
p := new(string)
|
||||
f.StringVarP(p, name, shorthand, value, usage)
|
||||
|
@ -63,7 +74,7 @@ func String(name string, value string, usage string) *string {
|
|||
return CommandLine.StringP(name, "", value, usage)
|
||||
}
|
||||
|
||||
// Like String, but accepts a shorthand letter that can be used after a single dash.
|
||||
// StringP is like String, but accepts a shorthand letter that can be used after a single dash.
|
||||
func StringP(name, shorthand string, value string, usage string) *string {
|
||||
return CommandLine.StringP(name, shorthand, value, usage)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue