save code
This commit is contained in:
parent
632ef3ed7f
commit
cd11f3c699
@ -181,7 +181,7 @@ func (df *DataFilter) formatRule() {
|
|||||||
}
|
}
|
||||||
// 数组层级深度不同,重新对对齐数据
|
// 数组层级深度不同,重新对对齐数据
|
||||||
diffArr := sourcePathArr[0 : len(sourcePathArr)-len(mapPathArr)-1]
|
diffArr := sourcePathArr[0 : len(sourcePathArr)-len(mapPathArr)-1]
|
||||||
df.dealDiffArr(diffArr)
|
df.dealDiffArr(diffArr, sourcePathArr[len(sourcePathArr)-len(mapPathArr)-1:], mapPathArr)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if df.pathIsArrayValue(item.MapKey) {
|
if df.pathIsArrayValue(item.MapKey) {
|
||||||
@ -207,7 +207,7 @@ func (df *DataFilter) formatRule() {
|
|||||||
// Author : go_developer@163.com<白茶清欢>
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
//
|
//
|
||||||
// Date : 5:04 下午 2022/1/25
|
// Date : 5:04 下午 2022/1/25
|
||||||
func (df *DataFilter) dealDiffArr(diffArr []string) {
|
func (df *DataFilter) dealDiffArr(diffArr []string, sourceAfterArr []string, mapArr []string) {
|
||||||
diffArrStr := strings.Join(diffArr, ".[].")
|
diffArrStr := strings.Join(diffArr, ".[].")
|
||||||
if _, exist := df.hasDealDiffPath[diffArrStr]; exist {
|
if _, exist := df.hasDealDiffPath[diffArrStr]; exist {
|
||||||
// 已经处理过, 不再重复处理
|
// 已经处理过, 不再重复处理
|
||||||
|
Loading…
Reference in New Issue
Block a user