From d7b13abc189a755ee233fd5f80e4b428a44804ff Mon Sep 17 00:00:00 2001 From: Janos <86970079+janosdebugs@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:43:43 +0200 Subject: [PATCH] Linting fixes Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com> --- testproxy/http.go | 4 ++-- testproxy/http_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testproxy/http.go b/testproxy/http.go index 552a680..a2c49f7 100644 --- a/testproxy/http.go +++ b/testproxy/http.go @@ -344,8 +344,8 @@ func (h *httpProxyService) start() error { return fmt.Errorf("failed to listen on HTTPS port (%w)", err) } - h.httpAddr = httpListener.Addr().(*net.TCPAddr) //nolint:errcheck //This is always a TCPAddr, see above. - h.httpsAddr = httpsListener.Addr().(*net.TCPAddr) //nolint:errcheck //This is always a TCPAddr, see above. + h.httpAddr = httpListener.Addr().(*net.TCPAddr) + h.httpsAddr = httpsListener.Addr().(*net.TCPAddr) h.httpServer = &http.Server{ Addr: h.httpAddr.IP.String() + ":" + strconv.Itoa(h.httpAddr.Port), diff --git a/testproxy/http_test.go b/testproxy/http_test.go index 178477c..4c8bbdb 100644 --- a/testproxy/http_test.go +++ b/testproxy/http_test.go @@ -63,7 +63,7 @@ func testHTTPProxyInConnectMode(t *testing.T) { // Note: this will also stop the goroutine below. _ = backingServer.Close() }) - addr := backingServer.Addr().(*net.TCPAddr) //nolint:errcheck //This is always a TCPAddr, see above. + addr := backingServer.Addr().(*net.TCPAddr) addrPort := addr.IP.String() + ":" + strconv.Itoa(addr.Port) t.Logf("🪧 Setting up proxy server...") @@ -250,7 +250,7 @@ func testHTTPProxySetupBackingHTTPServer(ctx context.Context, t *testing.T) stri if err != nil { t.Fatal(err) } - tcpAddr := listener.Addr().(*net.TCPAddr) //nolint:errcheck //This is always a TCPAddr, see above. + tcpAddr := listener.Addr().(*net.TCPAddr) addr := testHTTPProxyStartHTTPServer(t, tcpAddr, listener) testHTTPProxyWaitForHTTPServer(ctx, t, addr, nil) return addr @@ -268,7 +268,7 @@ func testHTTPProxySetupBackingHTTPSServer(ctx context.Context, t *testing.T, ca if err != nil { t.Fatal(err) } - tcpAddr := listener.Addr().(*net.TCPAddr) //nolint:errcheck //This is always a TCPAddr, see above. + tcpAddr := listener.Addr().(*net.TCPAddr) addr := testHTTPProxyStartHTTPServer(t, tcpAddr, listener) testHTTPProxyWaitForHTTPServer(ctx, t, addr, ca.GetPEMCACert()) return addr