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:
Houmgaor
2026-02-17 23:57:14 +01:00
parent abb40f163c
commit c64dabc3ba
29 changed files with 61 additions and 53 deletions

View File

@@ -124,7 +124,7 @@ func TestAPIServerStart(t *testing.T) {
// This might fail if the server didn't start properly or port is blocked
t.Logf("Failed to connect to server: %v", err)
} else {
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusNotFound {
t.Logf("Unexpected status code: %d", resp.StatusCode)
}