|
|
@@ -277,9 +277,9 @@ func recursiveUpdate(dst, src reflect.Value) error {
|
|
|
if srcVal.Kind() == reflect.Interface {
|
|
|
srcVal = srcVal.Elem()
|
|
|
}
|
|
|
- if err := recursiveUpdate(dstField, srcVal); err != nil {
|
|
|
- return err
|
|
|
- }
|
|
|
+ if err := recursiveUpdate(dstField.Addr().Elem(), srcVal); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
@@ -291,6 +291,7 @@ func recursiveUpdate(dst, src reflect.Value) error {
|
|
|
dstVal := dst.MapIndex(key)
|
|
|
if !dstVal.IsValid() {
|
|
|
dstVal = reflect.New(dst.Type().Elem()).Elem()
|
|
|
+ dst.SetMapIndex(key, dstVal)
|
|
|
}
|
|
|
// Recursive call to handle potential nested maps or structs
|
|
|
if err := recursiveUpdate(dstVal, srcVal); err != nil {
|