Merge remote-tracking branch 'upstream/master' into master
* upstream/master: Panic when copying private properties. Fixes: 126917357 Test: m checkbuild Change-Id: I34a7fd48c99c80cdbaadf547a7e9d84f180a6108
This commit is contained in:
commit
9e75985c0d
1 changed files with 1 additions and 2 deletions
|
@ -35,8 +35,7 @@ func CopyProperties(dstValue, srcValue reflect.Value) {
|
|||
|
||||
for i, field := range typeFields(typ) {
|
||||
if field.PkgPath != "" {
|
||||
// The field is not exported so just skip it.
|
||||
continue
|
||||
panic(fmt.Errorf("can't copy a private field %q", field.Name))
|
||||
}
|
||||
|
||||
srcFieldValue := srcValue.Field(i)
|
||||
|
|
Loading…
Reference in a new issue