From ebd109bce79ab104e5199641b3ed60b8ced4d6ef Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Tue, 27 Aug 2024 18:32:31 -0600 Subject: [PATCH] util: short-circuit dir entry loop --- util/tempfile_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util/tempfile_test.go b/util/tempfile_test.go index 7a707ae..63b7f8c 100644 --- a/util/tempfile_test.go +++ b/util/tempfile_test.go @@ -182,6 +182,7 @@ func TestTempFile(t *testing.T) { for _, entry := range entries { if entry.Name() == filepath.Base(newPath) { found = true + break } } if !found {