fix: Add defer.close for all queries

This commit is contained in:
2026-03-11 05:04:20 +01:00
parent f9aa47ea1c
commit 5d3d77620e
12 changed files with 709 additions and 35 deletions

View File

@@ -0,0 +1,7 @@
All changes are already in place and verified:
- **Build**: passes
- **go vet**: passes
- **Tests**: pass
The changes are currently unstaged. All 16 locations from the plan have been fixed — `defer rows.Close()` added after each `Query()` error check, manual `rows.Close()` calls in error paths removed, and `rows.Err()` checks added where missing. The `AddJobCount` function was also simplified from `Query` + loop to `QueryRow().Scan()` since it returns a single value.