fix merge attributes
This commit is contained in:
parent
e6953fa77d
commit
e4ec75f676
10
query.go
10
query.go
@ -57,10 +57,14 @@ func mergeAttributes(c []any) Attributes {
|
||||
}
|
||||
|
||||
to := Attributes{values: make(map[string]any)}
|
||||
for _, ai := range a {
|
||||
for _, name := range ai.names {
|
||||
for i := len(a) - 1; i >= 0; i-- {
|
||||
for _, name := range a[i].names {
|
||||
if _, set := to.values[name]; set {
|
||||
continue
|
||||
}
|
||||
|
||||
to.names = append(to.names, name)
|
||||
to.values[name] = ai.values[name]
|
||||
to.values[name] = a[i].values[name]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user