mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
bump(github.com/spf13/pflag): 5ccb023bc27df288a957c5e994cd44fd19619465
This commit is contained in:
parent
5423eaf431
commit
1d894c7a6a
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -2151,7 +2151,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/spf13/pflag",
|
"ImportPath": "github.com/spf13/pflag",
|
||||||
"Rev": "c7e63cf4530bcd3ba943729cee0efeff2ebea63f"
|
"Rev": "5ccb023bc27df288a957c5e994cd44fd19619465"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/spf13/viper",
|
"ImportPath": "github.com/spf13/viper",
|
||||||
|
3
vendor/github.com/spf13/pflag/.travis.yml
generated
vendored
3
vendor/github.com/spf13/pflag/.travis.yml
generated
vendored
@ -3,9 +3,8 @@ sudo: false
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.5.4
|
|
||||||
- 1.6.3
|
- 1.6.3
|
||||||
- 1.7
|
- 1.7.3
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
6
vendor/github.com/spf13/pflag/flag.go
generated
vendored
6
vendor/github.com/spf13/pflag/flag.go
generated
vendored
@ -416,7 +416,7 @@ func Set(name, value string) error {
|
|||||||
// otherwise, the default values of all defined flags in the set.
|
// otherwise, the default values of all defined flags in the set.
|
||||||
func (f *FlagSet) PrintDefaults() {
|
func (f *FlagSet) PrintDefaults() {
|
||||||
usages := f.FlagUsages()
|
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
|
// defaultIsZeroValue returns true if the default value for this flag represents
|
||||||
@ -514,7 +514,7 @@ func (f *FlagSet) FlagUsages() string {
|
|||||||
if len(flag.NoOptDefVal) > 0 {
|
if len(flag.NoOptDefVal) > 0 {
|
||||||
switch flag.Value.Type() {
|
switch flag.Value.Type() {
|
||||||
case "string":
|
case "string":
|
||||||
line += fmt.Sprintf("[=%q]", flag.NoOptDefVal)
|
line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
|
||||||
case "bool":
|
case "bool":
|
||||||
if flag.NoOptDefVal != "true" {
|
if flag.NoOptDefVal != "true" {
|
||||||
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
|
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
|
||||||
@ -534,7 +534,7 @@ func (f *FlagSet) FlagUsages() string {
|
|||||||
line += usage
|
line += usage
|
||||||
if !flag.defaultIsZeroValue() {
|
if !flag.defaultIsZeroValue() {
|
||||||
if flag.Value.Type() == "string" {
|
if flag.Value.Type() == "string" {
|
||||||
line += fmt.Sprintf(" (default %q)", flag.DefValue)
|
line += fmt.Sprintf(" (default \"%s\")", flag.DefValue)
|
||||||
} else {
|
} else {
|
||||||
line += fmt.Sprintf(" (default %s)", flag.DefValue)
|
line += fmt.Sprintf(" (default %s)", flag.DefValue)
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/spf13/pflag/string_array.go
generated
vendored
3
vendor/github.com/spf13/pflag/string_array.go
generated
vendored
@ -2,7 +2,6 @@ package pflag
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = fmt.Fprint
|
var _ = fmt.Fprint
|
||||||
@ -40,7 +39,7 @@ func (s *stringArrayValue) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stringArrayConv(sval string) (interface{}, error) {
|
func stringArrayConv(sval string) (interface{}, error) {
|
||||||
sval = strings.Trim(sval, "[]")
|
sval = sval[1 : len(sval)-1]
|
||||||
// An empty string would cause a array with one (empty) string
|
// An empty string would cause a array with one (empty) string
|
||||||
if len(sval) == 0 {
|
if len(sval) == 0 {
|
||||||
return []string{}, nil
|
return []string{}, nil
|
||||||
|
2
vendor/github.com/spf13/pflag/string_slice.go
generated
vendored
2
vendor/github.com/spf13/pflag/string_slice.go
generated
vendored
@ -66,7 +66,7 @@ func (s *stringSliceValue) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stringSliceConv(sval string) (interface{}, error) {
|
func stringSliceConv(sval string) (interface{}, error) {
|
||||||
sval = strings.Trim(sval, "[]")
|
sval = sval[1 : len(sval)-1]
|
||||||
// An empty string would cause a slice with one (empty) string
|
// An empty string would cause a slice with one (empty) string
|
||||||
if len(sval) == 0 {
|
if len(sval) == 0 {
|
||||||
return []string{}, nil
|
return []string{}, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user