From 33c2f3f0236cdcf4df1db1b00d1e02032b3c26c8 Mon Sep 17 00:00:00 2001 From: saji Date: Tue, 13 Feb 2024 10:50:11 -0600 Subject: [PATCH] fix bug preventing slice copy --- cmd/gotelem/cli/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gotelem/cli/client.go b/cmd/gotelem/cli/client.go index 03626fe..b398cad 100644 --- a/cmd/gotelem/cli/client.go +++ b/cmd/gotelem/cli/client.go @@ -91,7 +91,7 @@ func importAction(ctx *cli.Context) error { batchIdx := 0 // stats for imports - var n_pkt atomic.Int64 + var n_pkt atomic.Int64 delegateInsert := func(events []skylab.BusEvent) { n, err := db.AddEventsCtx(ctx.Context, events...) @@ -130,7 +130,7 @@ func importAction(ctx *cli.Context) error { if batchIdx >= int(bSize) { // flush it!!!! wg.Add(1) - e := make([]skylab.BusEvent, 0, bSize) + e := make([]skylab.BusEvent, bSize) copy(e, eventsBatch) go func(e []skylab.BusEvent) { delegateInsert(e)