pkg/tailfile: rename max/min as it collides with go1.21 builtin

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 79495c5b6a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-26 19:43:36 +02:00
parent 0b97ecddb0
commit 4e11c149d1
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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()