Explorar el Código

experimenting with recursive update

reid hace 2 años
padre
commit
7fc43a3b61
Se han modificado 1 ficheros con 0 adiciones y 1 borrados
  1. 0 1
      broadcast/broadcast.go

+ 0 - 1
broadcast/broadcast.go

@@ -291,7 +291,6 @@ 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 {