对外暴露compare方法
This commit is contained in:
@ -69,6 +69,7 @@ type CustomDiffFunc func(field string, inputVal wrapper.Map, storageVal wrapper.
|
||||
//
|
||||
// Date : 11:10 2024/3/8
|
||||
type DiffResult struct {
|
||||
Field string `json:"field"` // 字段名
|
||||
OldVal interface{} `json:"old_val"` // 当前field在storageVal中的值
|
||||
NewVal interface{} `json:"new_val"` // 当前field在inputVal中的值
|
||||
IsSame bool `json:"is_same"` // 两个值是否相同
|
||||
@ -126,6 +127,7 @@ func DefaultDiffFunc(field string, inputVal wrapper.Map, storageVal wrapper.Map,
|
||||
option = NewDiffOption()
|
||||
}
|
||||
result := &DiffResult{
|
||||
Field: field,
|
||||
OldVal: nil,
|
||||
NewVal: nil,
|
||||
IsSame: true,
|
||||
|
Reference in New Issue
Block a user