Merged in meta-delete-fix (pull request #382)

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

Approved-by: Ella Pietraroia <ella@ausocean.org>
This commit is contained in:
Scott Barnard 2020-02-26 00:33:23 +00:00
commit cd3351543c
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) delete(m.data, key)
for i, k := range m.order { for i, k := range m.order {
if k == key { 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] m.order = m.order[:len(m.order)-1]
break break
} }