mirror of
https://github.com/ngrok/ngrok-go.git
synced 2026-05-17 16:50:45 +00:00
fix: ignore the new errors found by the updated golint
This commit is contained in:
+3
-3
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user