From 79495c5b6a78106901477e68fe0d7a2249c594b9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 26 Aug 2023 19:43:36 +0200 Subject: [PATCH] pkg/tailfile: rename max/min as it collides with go1.21 builtin Signed-off-by: Sebastiaan van Stijn --- pkg/tailfile/tailfile_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tailfile/tailfile_test.go b/pkg/tailfile/tailfile_test.go index 15c8acfe01..107df6aec4 100644 --- a/pkg/tailfile/tailfile_test.go +++ b/pkg/tailfile/tailfile_test.go @@ -209,9 +209,9 @@ func TestNewTailReader(t *testing.T) { test := test t.Parallel() - max := len(test.data) - if max > 10 { - max = 10 + maxLen := len(test.data) + if maxLen > 10 { + maxLen = 10 } s := strings.Join(test.data, string(delim)) @@ -219,7 +219,7 @@ func TestNewTailReader(t *testing.T) { s += string(delim) } - for i := 1; i <= max; i++ { + for i := 1; i <= maxLen; i++ { t.Run(fmt.Sprintf("%d lines", i), func(t *testing.T) { i := i t.Parallel()