mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
use clear()
This commit is contained in:
@@ -55,9 +55,7 @@ func (b *SendBatch) Flush() error {
|
||||
if len(b.bufs) > 0 {
|
||||
err = b.out.WriteBatch(b.bufs, b.dsts, b.ecns)
|
||||
}
|
||||
for i := range b.bufs {
|
||||
b.bufs[i] = nil
|
||||
}
|
||||
clear(b.bufs)
|
||||
b.bufs = b.bufs[:0]
|
||||
b.dsts = b.dsts[:0]
|
||||
b.ecns = b.ecns[:0]
|
||||
|
||||
Reference in New Issue
Block a user