container/mts/meta: make Delete method correctly update order field

This commit is contained in:
Scott 2020-02-26 10:53:22 +10:30
parent a78dd9e4b2
commit 813c1d38e7
1 changed files with 1 additions and 1 deletions

View File

@ -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
}