Skip to content

Commit

Permalink
合并冲突
Browse files Browse the repository at this point in the history
  • Loading branch information
wln32 committed Mar 1, 2025
1 parent 7a99644 commit 2782527
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions util/gconv/gconv_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func scan(config *ConvertConfig, srcValue interface{}, dstPointer interface{}, p
}
// Special handling for struct or map slice elements
if dstElemKind == reflect.Struct || dstElemKind == reflect.Map {
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, paramKeyToAttrMap...)
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, config, paramKeyToAttrMap...)
}
// Handle basic type slice conversions
var srcValueReflectValueKind = srcValueReflectValue.Kind()
Expand Down Expand Up @@ -177,11 +177,11 @@ func scan(config *ConvertConfig, srcValue interface{}, dstPointer interface{}, p
dstPointerReflectValueElem.Set(newSlice)
return nil
}
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, paramKeyToAttrMap...)
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, config, paramKeyToAttrMap...)

default:
// Handle complex types (structs, maps, etc.)
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, paramKeyToAttrMap...)
return doScanForComplicatedTypes(srcValue, dstPointer, dstPointerReflectType, config, paramKeyToAttrMap...)
}
}

Expand All @@ -199,6 +199,7 @@ func scan(config *ConvertConfig, srcValue interface{}, dstPointer interface{}, p
func doScanForComplicatedTypes(
srcValue, dstPointer any,
dstPointerReflectType reflect.Type,
config *ConvertConfig,
paramKeyToAttrMap ...map[string]string,
) error {
// Try JSON conversion first
Expand Down

0 comments on commit 2782527

Please sign in to comment.