summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2020-05-05 08:57:17 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-05 13:35:55 -0400
commit2f0bc5ff1cde9afb595868b92dd123478af9ef74 (patch)
treed620dce86657a325eb82b251f95e9cd4903ca80f /vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
parente1be837a4ff149e00ff6af9e71cf9ea625e33e6f (diff)
downloadpodman-2f0bc5ff1cde9afb595868b92dd123478af9ef74.tar.gz
podman-2f0bc5ff1cde9afb595868b92dd123478af9ef74.tar.bz2
podman-2f0bc5ff1cde9afb595868b92dd123478af9ef74.zip
Bump k8s.io/api from 0.17.4 to 0.18.2
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.17.4 to 0.18.2. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](https://github.com/kubernetes/api/compare/v0.17.4...v0.18.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/runtime/conversion.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/runtime/conversion.go32
1 files changed, 24 insertions, 8 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
index 0947dce73..d04d701f3 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go
@@ -53,14 +53,6 @@ func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, st
return key, key
}
-// DefaultStringConversions are helpers for converting []string and string to real values.
-var DefaultStringConversions = []interface{}{
- Convert_Slice_string_To_string,
- Convert_Slice_string_To_int,
- Convert_Slice_string_To_bool,
- Convert_Slice_string_To_int64,
-}
-
func Convert_Slice_string_To_string(in *[]string, out *string, s conversion.Scope) error {
if len(*in) == 0 {
*out = ""
@@ -178,3 +170,27 @@ func Convert_Slice_string_To_Pointer_int64(in *[]string, out **int64, s conversi
*out = &i
return nil
}
+
+func RegisterStringConversions(s *Scheme) error {
+ if err := s.AddConversionFunc((*[]string)(nil), (*string)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_Slice_string_To_string(a.(*[]string), b.(*string), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddConversionFunc((*[]string)(nil), (*int)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_Slice_string_To_int(a.(*[]string), b.(*int), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddConversionFunc((*[]string)(nil), (*bool)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_Slice_string_To_bool(a.(*[]string), b.(*bool), scope)
+ }); err != nil {
+ return err
+ }
+ if err := s.AddConversionFunc((*[]string)(nil), (*int64)(nil), func(a, b interface{}, scope conversion.Scope) error {
+ return Convert_Slice_string_To_int64(a.(*[]string), b.(*int64), scope)
+ }); err != nil {
+ return err
+ }
+ return nil
+}