diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-09-30 12:40:08 +0000 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-09-30 15:03:39 +0200 |
commit | c245ef9d1b2322a35344bbf837baaf3892378bef (patch) | |
tree | 13b545f5743e8f047b1291d276334aeb11c0da97 /vendor/github.com/spf13/pflag/string_array.go | |
parent | 01b7af8ee9b3df1439c4da109ba11e7410108dab (diff) | |
download | podman-c245ef9d1b2322a35344bbf837baaf3892378bef.tar.gz podman-c245ef9d1b2322a35344bbf837baaf3892378bef.tar.bz2 podman-c245ef9d1b2322a35344bbf837baaf3892378bef.zip |
Bump github.com/spf13/pflag from 1.0.3 to 1.0.5
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.3 to 1.0.5.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.3...v1.0.5)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/spf13/pflag/string_array.go')
-rw-r--r-- | vendor/github.com/spf13/pflag/string_array.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/pflag/string_array.go b/vendor/github.com/spf13/pflag/string_array.go index fa7bc6018..4894af818 100644 --- a/vendor/github.com/spf13/pflag/string_array.go +++ b/vendor/github.com/spf13/pflag/string_array.go @@ -23,6 +23,32 @@ func (s *stringArrayValue) Set(val string) error { return nil } +func (s *stringArrayValue) Append(val string) error { + *s.value = append(*s.value, val) + return nil +} + +func (s *stringArrayValue) Replace(val []string) error { + out := make([]string, len(val)) + for i, d := range val { + var err error + out[i] = d + if err != nil { + return err + } + } + *s.value = out + return nil +} + +func (s *stringArrayValue) GetSlice() []string { + out := make([]string, len(*s.value)) + for i, d := range *s.value { + out[i] = d + } + return out +} + func (s *stringArrayValue) Type() string { return "stringArray" } |