增加合并数据并转换能力
This commit is contained in:
parent
cb0f7b9151
commit
399e964daa
16
json.go
16
json.go
@ -172,6 +172,22 @@ func (oj *ownJSON) MergeDataForMapIgnoreError(dataList ...interface{}) map[strin
|
||||
return res
|
||||
}
|
||||
|
||||
// MergeDataForReceiver 合并数据并转换
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 17:07 2024/1/10
|
||||
func (oj *ownJSON) MergeDataForReceiver(receiver interface{}, dataList ...interface{}) error {
|
||||
res, err := oj.MergeDataForMap(false, dataList)
|
||||
if nil != err {
|
||||
return err
|
||||
}
|
||||
if err = oj.Transition(res, receiver); nil != err {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ConsoleOutput ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
|
Loading…
Reference in New Issue
Block a user