From aebbcfd4f17e597eab7c3119e2ef90370bc28a4c Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 3 Jan 2024 10:39:55 +0000 Subject: [PATCH] nit: clean batch capacity (#17) Since we discussed this in https://git.numtide.com/numtide/treefmt/pulls/14#issuecomment-609 It doesn't really matter. Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/17 Co-authored-by: zimbatm Co-committed-by: zimbatm --- 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