fix: ignore the new errors found by the updated golint

This commit is contained in:
Benjamin Pollack
2026-02-18 18:46:41 +00:00
parent 0bf0b6bdab
commit bc175ddde5
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ func (e *endpointForwarder) handleConnection(ctx context.Context, conn net.Conn)
// Connect to the backend server
backend, err := e.connectToBackend(ctx)
if err != nil {
conn.Close()
_ = conn.Close()
// Could log the error here
return
}
@@ -156,14 +156,14 @@ func (e *endpointForwarder) join(left, right net.Conn) {
// Copy from left to right
go func() {
defer wg.Done()
defer right.Close()
defer right.Close() //nolint:errcheck
_, _ = io.Copy(right, left)
}()
// Copy from right to left
go func() {
defer wg.Done()
defer left.Close()
defer left.Close() //nolint:errcheck
_, _ = io.Copy(left, right)
}()
+5 -5
View File
@@ -54,8 +54,8 @@ func TestWrapConnWithTLS(t *testing.T) {
// Create a pipe for testing
serverConn, clientConn := net.Pipe()
defer serverConn.Close()
defer clientConn.Close()
defer serverConn.Close() //nolint:errcheck
defer clientConn.Close() //nolint:errcheck
// Apply TLS in a separate goroutine
go func() {
@@ -75,7 +75,7 @@ func TestWrapConnWithTLS(t *testing.T) {
}
// Close the client connection
clientTLS.Close()
_ = clientTLS.Close()
}()
// Wrap the server connection with TLS
@@ -101,8 +101,8 @@ func TestWrapConnWithTLS(t *testing.T) {
func TestWrapConnWithTLSNil(t *testing.T) {
// Create a pipe for testing
conn1, conn2 := net.Pipe()
defer conn1.Close()
defer conn2.Close()
defer conn1.Close() //nolint:errcheck
defer conn2.Close() //nolint:errcheck
// Call wrapConnWithTLS with nil config
result := wrapConnWithTLS(conn1, nil)