Fix CopyProperties on interface to pointer to struct
CopyProperties expects to interfaces in a struct to be an interface to a pointer to a struct, but expects to be called on a struct. When a struct contains an interface, dereference it twice with Elem() before calling CopyProperties on it. Change-Id: I0d10aff87729273a025ab6d86239fd60662a20c0
This commit is contained in:
parent
be1a9a10cd
commit
f77510c1eb
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ func CopyProperties(dstValue, srcValue reflect.Value) {
|
|||
dstFieldValue.Set(CloneProperties(elem))
|
||||
} else {
|
||||
// Re-use the existing allocation.
|
||||
CopyProperties(dstFieldValue, srcFieldValue)
|
||||
CopyProperties(dstFieldValue.Elem().Elem(), srcFieldValue.Elem().Elem())
|
||||
}
|
||||
} else {
|
||||
dstFieldValue.Set(srcFieldValue)
|
||||
|
|
Loading…
Reference in a new issue