summaryrefslogtreecommitdiff
path: root/vendor/sigs.k8s.io
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-04-09 08:04:51 +0000
committerGitHub <noreply@github.com>2021-04-09 08:04:51 +0000
commit14375f35ee00c16327edcd0f5883cc66810fc7db (patch)
treed904edbc6162b8eddc563476614d03dd1eee75ed /vendor/sigs.k8s.io
parent4efac1f76012c35122bca7c8feebc33141fc47d3 (diff)
downloadpodman-14375f35ee00c16327edcd0f5883cc66810fc7db.tar.gz
podman-14375f35ee00c16327edcd0f5883cc66810fc7db.tar.bz2
podman-14375f35ee00c16327edcd0f5883cc66810fc7db.zip
Bump k8s.io/api from 0.20.5 to 0.21.0
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.20.5 to 0.21.0. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](https://github.com/kubernetes/api/compare/v0.20.5...v0.21.0) Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/sigs.k8s.io')
-rw-r--r--vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go
index 49e6dd169..a5a467c0f 100644
--- a/vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/value/reflectcache.go
@@ -70,11 +70,11 @@ func (f *FieldCacheEntry) CanOmit(fieldVal reflect.Value) bool {
return f.isOmitEmpty && (safeIsNil(fieldVal) || isZero(fieldVal))
}
-// GetUsing returns the field identified by this FieldCacheEntry from the provided struct.
+// GetFrom returns the field identified by this FieldCacheEntry from the provided struct.
func (f *FieldCacheEntry) GetFrom(structVal reflect.Value) reflect.Value {
// field might be nested within 'inline' structs
for _, elem := range f.fieldPath {
- structVal = structVal.FieldByIndex(elem)
+ structVal = dereference(structVal).FieldByIndex(elem)
}
return structVal
}
@@ -150,7 +150,11 @@ func buildStructCacheEntry(t reflect.Type, infos map[string]*FieldCacheEntry, fi
continue
}
if isInline {
- buildStructCacheEntry(field.Type, infos, append(fieldPath, field.Index))
+ e := field.Type
+ if field.Type.Kind() == reflect.Ptr {
+ e = field.Type.Elem()
+ }
+ buildStructCacheEntry(e, infos, append(fieldPath, field.Index))
continue
}
info := &FieldCacheEntry{JsonName: jsonName, isOmitEmpty: isOmitempty, fieldPath: append(fieldPath, field.Index), fieldType: field.Type}