diff --git a/stream/mts/meta/meta.go b/stream/mts/meta/meta.go index 466cb8e8..bc3a6da6 100644 --- a/stream/mts/meta/meta.go +++ b/stream/mts/meta/meta.go @@ -120,7 +120,8 @@ func (m *Metadata) Delete(key string) error { delete(m.data, key) for i, k := range m.order { if k == key { - m.order = append(m.order[:i], m.order[i+1:]...) + copy(m.order[:i], m.order[i+1:]) + m.order = m.order[:len(m.order)-1] break } }