Skip to content

Commit

Permalink
Do not include index in when adding slice to tree path
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed May 24, 2024
1 parent 26ea22a commit 48a149b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra/conf/merge/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func sortMergeSlices(target map[string]interface{}, path string) error {
return err
}
target[key] = s
for i, item := range s {
for _, item := range s {
if m, ok := item.(map[string]interface{}); ok {
sortMergeSlices(m, fmt.Sprintf("%s.%s.%d", path, key, i))
sortMergeSlices(m, fmt.Sprintf("%s.%s[]", path, key))
}
}
} else if field, ok := value.(map[string]interface{}); ok {
Expand Down

0 comments on commit 48a149b

Please sign in to comment.