Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1d894c7a
Commit
1d894c7a
authored
Oct 27, 2016
by
Martin Milata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump(github.com/spf13/pflag): 5ccb023bc27df288a957c5e994cd44fd19619465
parent
5423eaf4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
9 deletions
+7
-9
Godeps.json
Godeps/Godeps.json
+1
-1
.travis.yml
vendor/github.com/spf13/pflag/.travis.yml
+1
-2
flag.go
vendor/github.com/spf13/pflag/flag.go
+3
-3
string_array.go
vendor/github.com/spf13/pflag/string_array.go
+1
-2
string_slice.go
vendor/github.com/spf13/pflag/string_slice.go
+1
-1
No files found.
Godeps/Godeps.json
View file @
1d894c7a
...
@@ -2151,7 +2151,7 @@
...
@@ -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"
,
...
...
vendor/github.com/spf13/pflag/.travis.yml
View file @
1d894c7a
...
@@ -3,9 +3,8 @@ sudo: false
...
@@ -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
:
...
...
vendor/github.com/spf13/pflag/flag.go
View file @
1d894c7a
...
@@ -416,7 +416,7 @@ func Set(name, value string) error {
...
@@ -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
.
Fprint
f
(
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 {
...
@@ -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 {
...
@@ -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
)
}
}
...
...
vendor/github.com/spf13/pflag/string_array.go
View file @
1d894c7a
...
@@ -2,7 +2,6 @@ package pflag
...
@@ -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 {
...
@@ -40,7 +39,7 @@ func (s *stringArrayValue) String() string {
}
}
func
stringArrayConv
(
sval
string
)
(
interface
{},
error
)
{
func
stringArrayConv
(
sval
string
)
(
interface
{},
error
)
{
sval
=
s
trings
.
Trim
(
sval
,
"[]"
)
sval
=
s
val
[
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
...
...
vendor/github.com/spf13/pflag/string_slice.go
View file @
1d894c7a
...
@@ -66,7 +66,7 @@ func (s *stringSliceValue) String() string {
...
@@ -66,7 +66,7 @@ func (s *stringSliceValue) String() string {
}
}
func
stringSliceConv
(
sval
string
)
(
interface
{},
error
)
{
func
stringSliceConv
(
sval
string
)
(
interface
{},
error
)
{
sval
=
s
trings
.
Trim
(
sval
,
"[]"
)
sval
=
s
val
[
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment