summaryrefslogtreecommitdiff
path: root/vendor/github.com/ulule/deepcopier/deepcopier.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-26 18:26:55 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-27 18:09:12 +0000
commitaf64e10400f8533a0c48ecdf5ab9b7fbf329e14e (patch)
tree59160e3841b440dd35189c724bbb4375a7be173b /vendor/github.com/ulule/deepcopier/deepcopier.go
parent26d7e3c7b85e28c4e42998c90fdcc14079f13eef (diff)
downloadpodman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.gz
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.tar.bz2
podman-af64e10400f8533a0c48ecdf5ab9b7fbf329e14e.zip
Vendor in lots of kubernetes stuff to shrink image size
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #554 Approved by: mheon
Diffstat (limited to 'vendor/github.com/ulule/deepcopier/deepcopier.go')
-rw-r--r--vendor/github.com/ulule/deepcopier/deepcopier.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/ulule/deepcopier/deepcopier.go b/vendor/github.com/ulule/deepcopier/deepcopier.go
index 8cccb5b78..8a6c70b55 100644
--- a/vendor/github.com/ulule/deepcopier/deepcopier.go
+++ b/vendor/github.com/ulule/deepcopier/deepcopier.go
@@ -124,6 +124,12 @@ func process(dst interface{}, src interface{}, args ...Options) error {
// Valuer -> ptr
if isNullableType(srcFieldType.Type) && dstFieldValue.Kind() == reflect.Ptr && force {
+ // We have same nullable type on both sides
+ if srcFieldValue.Type().AssignableTo(dstFieldType.Type) {
+ dstFieldValue.Set(srcFieldValue)
+ continue
+ }
+
v, _ := srcFieldValue.Interface().(driver.Valuer).Value()
if v == nil {
continue
@@ -143,6 +149,12 @@ func process(dst interface{}, src interface{}, args ...Options) error {
// Valuer -> value
if isNullableType(srcFieldType.Type) {
+ // We have same nullable type on both sides
+ if srcFieldValue.Type().AssignableTo(dstFieldType.Type) {
+ dstFieldValue.Set(srcFieldValue)
+ continue
+ }
+
if force {
v, _ := srcFieldValue.Interface().(driver.Valuer).Value()
if v == nil {