mirror of https://bitbucket.org/ausocean/av.git
container/mts/meta: make Delete method correctly update order field
This commit is contained in:
parent
a78dd9e4b2
commit
813c1d38e7
|
@ -142,7 +142,7 @@ func (m *Data) Delete(key string) {
|
|||
delete(m.data, key)
|
||||
for i, k := range m.order {
|
||||
if k == key {
|
||||
copy(m.order[:i], m.order[i+1:])
|
||||
copy(m.order[i:], m.order[i+1:])
|
||||
m.order = m.order[:len(m.order)-1]
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue