mirror of https://bitbucket.org/ausocean/av.git
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:
commit
cd3351543c
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue