mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
## Summary - Fix nested map conversion data loss when using `gconv.Scan()` or `MapToMap()` - When converting `map[string]any` to `map[string]map[string]float64`, the nested data was lost - Root cause: `MapToMap` incorrectly called `Struct()` for map value types - Solution: Separate `reflect.Map` handling from `reflect.Struct`, use recursive `MapToMap()` for nested maps ## Test plan - [x] Added test case reproducing original bug (nested map conversion) - [x] Added test cases for deep nesting (3-5 levels) - [x] Added test case for different key types - [x] Added test case for empty nested map - [x] Verified struct conversion still works (no regression) - [x] Verified no infinite recursion with timeout tests - [x] All gconv tests pass Closes #4542 --------- Co-authored-by: hailaz <739476267@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>