diff --git a/util/deepcopy.go b/util/deepcopy.go index b5b01ac4..74a0d249 100644 --- a/util/deepcopy.go +++ b/util/deepcopy.go @@ -38,7 +38,10 @@ func deepCopy(dst, src reflect.Value) { } case reflect.Struct: for i := 0; i < src.NumField(); i++ { - deepCopy(dst.Field(i), src.Field(i)) + value := src.Field(i) + if value.CanSet() { + deepCopy(dst.Field(i), value) + } } default: dst.Set(src)