mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
fix: check all Close() return values for errcheck lint
Add explicit error discards (_ =) for Close() calls on network connections, SQL rows, and file handles across 28 files. Also add .golangci.yml with standard linter defaults to match CI configuration.
This commit is contained in:
@@ -354,8 +354,8 @@ func TestSessionWorkWithDevModeLogging(t *testing.T) {
|
||||
}
|
||||
|
||||
clientConn, serverConn := net.Pipe()
|
||||
defer clientConn.Close()
|
||||
defer serverConn.Close()
|
||||
defer func() { _ = clientConn.Close() }()
|
||||
defer func() { _ = serverConn.Close() }()
|
||||
|
||||
session := &Session{
|
||||
logger: logger,
|
||||
@@ -364,7 +364,7 @@ func TestSessionWorkWithDevModeLogging(t *testing.T) {
|
||||
cryptConn: network.NewCryptConn(serverConn),
|
||||
}
|
||||
|
||||
clientConn.Close()
|
||||
_ = clientConn.Close()
|
||||
|
||||
session.work()
|
||||
}
|
||||
@@ -380,7 +380,7 @@ func TestSessionWorkWithEmptyRead(t *testing.T) {
|
||||
}
|
||||
|
||||
clientConn, serverConn := net.Pipe()
|
||||
defer serverConn.Close()
|
||||
defer func() { _ = serverConn.Close() }()
|
||||
|
||||
session := &Session{
|
||||
logger: logger,
|
||||
@@ -389,7 +389,7 @@ func TestSessionWorkWithEmptyRead(t *testing.T) {
|
||||
cryptConn: network.NewCryptConn(serverConn),
|
||||
}
|
||||
|
||||
clientConn.Close()
|
||||
_ = clientConn.Close()
|
||||
|
||||
session.work()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user