build(deps): bump github.com/spf13/cobra from 0.0.3 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 0.0.3 to 1.4.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Changelog](https://github.com/spf13/cobra/blob/v1.4.0/CHANGELOG.md) - [Commits](https://github.com/spf13/cobra/compare/v0.0.3...v1.4.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
717f28adfb
commit
d38d4ab2c9
54 changed files with 5629 additions and 1154 deletions
30
vendor/github.com/spf13/pflag/int_slice.go
generated
vendored
30
vendor/github.com/spf13/pflag/int_slice.go
generated
vendored
|
|
@ -51,6 +51,36 @@ func (s *intSliceValue) String() string {
|
|||
return "[" + strings.Join(out, ",") + "]"
|
||||
}
|
||||
|
||||
func (s *intSliceValue) Append(val string) error {
|
||||
i, err := strconv.Atoi(val)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*s.value = append(*s.value, i)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *intSliceValue) Replace(val []string) error {
|
||||
out := make([]int, len(val))
|
||||
for i, d := range val {
|
||||
var err error
|
||||
out[i], err = strconv.Atoi(d)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
*s.value = out
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *intSliceValue) GetSlice() []string {
|
||||
out := make([]string, len(*s.value))
|
||||
for i, d := range *s.value {
|
||||
out[i] = strconv.Itoa(d)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func intSliceConv(val string) (interface{}, error) {
|
||||
val = strings.Trim(val, "[]")
|
||||
// Empty string would cause a slice with one (empty) entry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue