From d1bb8bb00dfc756f5f3705fd8c8a19ca22f40083 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 3 Jan 2024 11:16:16 +0100 Subject: [PATCH] nit: clean batch capacity Since we discussed this in https://git.numtide.com/numtide/treefmt/pulls/14#issuecomment-609 It doesn't really matter. --- internal/cli/format.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/cli/format.go b/internal/cli/format.go index 174e61f..298030a 100644 --- a/internal/cli/format.go +++ b/internal/cli/format.go @@ -110,8 +110,7 @@ func (f *Format) Run() error { // update cache as paths are completed eg.Go(func() error { batchSize := 1024 - batch := make([]string, batchSize) - batch = batch[:0] + batch := make([]string, 0, batchSize) var pending, completed, changes int -- 2.45.1