Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Janos <[email protected]>
  • Loading branch information
Janos committed Aug 12, 2024
1 parent e328c84 commit d7b13ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions testproxy/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions testproxy/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d7b13ab

Please sign in to comment.