From 3f19370fe5e8d8fe2ddd927de54b1aede379f2b7 Mon Sep 17 00:00:00 2001 From: xiantang Date: Sun, 5 May 2024 22:57:11 +0800 Subject: [PATCH] Fix ci lint (#579) --- runner/proxy_stream_test.go | 2 +- runner/proxy_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runner/proxy_stream_test.go b/runner/proxy_stream_test.go index daf536e3..81a44322 100644 --- a/runner/proxy_stream_test.go +++ b/runner/proxy_stream_test.go @@ -20,7 +20,7 @@ func TestProxyStream(t *testing.T) { var wg sync.WaitGroup for i := 0; i < 10; i++ { wg.Add(1) - go func(i int) { + go func(_ int) { defer wg.Done() _ = stream.AddSubscriber() }(i) diff --git a/runner/proxy_test.go b/runner/proxy_test.go index 59d59e81..10480c2c 100644 --- a/runner/proxy_test.go +++ b/runner/proxy_test.go @@ -126,7 +126,7 @@ func TestProxy_proxyHandler(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { tt.assert(r) })) defer srv.Close() @@ -142,7 +142,7 @@ func TestProxy_proxyHandler(t *testing.T) { } func TestProxy_reloadHandler(t *testing.T) { - srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { fmt.Fprint(w, "thin air") })) srvPort := getServerPort(t, srv)