feat: 相关操作升级为泛型实现
This commit is contained in:
@ -9,8 +9,10 @@ package define
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/util"
|
||||
"git.zhangdeman.cn/zhangdeman/wrapper"
|
||||
"git.zhangdeman.cn/zhangdeman/wrapper/op_map"
|
||||
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
@ -61,7 +63,7 @@ func NewDiffOption() *DiffOption {
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:06 2024/3/8
|
||||
type CustomDiffFunc func(field string, inputVal wrapper.Map, storageVal wrapper.Map, option *DiffOption) *DiffResult
|
||||
type CustomDiffFunc func(field string, inputVal op_map.Map, storageVal op_map.Map, option *DiffOption) *DiffResult
|
||||
|
||||
// DiffResult 对比结果
|
||||
//
|
||||
@ -122,7 +124,7 @@ func IsSupportValueType(kind reflect.Kind) bool {
|
||||
// Author : zhangdeman001@ke.com<张德满>
|
||||
//
|
||||
// Date : 12:05 2024/3/8
|
||||
func DefaultDiffFunc(field string, inputVal wrapper.Map, storageVal wrapper.Map, option *DiffOption) *DiffResult {
|
||||
func DefaultDiffFunc(field string, inputVal op_map.Map, storageVal op_map.Map, option *DiffOption) *DiffResult {
|
||||
if nil == option {
|
||||
option = NewDiffOption()
|
||||
}
|
||||
|
Reference in New Issue
Block a user