From e382c1b9608d3a667aac3288e3a2fb3e2e2426c9 Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Thu, 19 Sep 2024 12:53:24 +0900 Subject: [PATCH] Disable int range to support go < 1.22 for a bit longer --- fluent_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fluent_test.go b/fluent_test.go index 00a45a1..dc3d383 100644 --- a/fluent_test.go +++ b/fluent_test.go @@ -255,7 +255,8 @@ func TestConnectOnStart(t *testing.T) { // find a port that is not available (this may be timing dependent) var dialer net.Dialer port := 22412 - for range 1000 { + //nolint:intrange + for i := 0; i < 1000; i++ { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) conn, err := dialer.DialContext(ctx, `net`, fmt.Sprintf(`127.0.0.1:%d`, port)) cancel() @@ -672,7 +673,8 @@ func TestPing(t *testing.T) { // find a port that is not available (this may be timing dependent) var dialer net.Dialer port := 22412 - for range 1000 { + //nolint:intrange + for i := 0; i < 1000; i++ { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) conn, err := dialer.DialContext(ctx, `net`, fmt.Sprintf(`127.0.0.1:%d`, port)) cancel()