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

@@ -60,7 +60,7 @@ func SetupTestDB(t *testing.T) *sqlx.DB {
// Test connection
if err := db.Ping(); err != nil {
db.Close()
_ = db.Close()
t.Skipf("Test database not available: %v. Run: docker compose -f docker/docker-compose.test.yml up -d", err)
return nil
}
@@ -207,7 +207,7 @@ func findProjectRoot(t *testing.T) string {
func TeardownTestDB(t *testing.T, db *sqlx.DB) {
t.Helper()
if db != nil {
db.Close()
_ = db.Close()
}
}