Fix lint errors: add error checks for errcheck linter
All checks were successful
Run Tests / Run Go Tests (push) Successful in 2m24s
Run Tests / Lint Code (push) Successful in 3m36s

- Add error check for JSON response in panic handler
- Remove duplicate defer CloseDB() call (handled in shutdown)
- Add error checks for all WriteField() calls in test files
- Add error checks for CreateFormFile() and Write() calls
- Fix golangci-lint Go 1.25 compatibility by installing from source
This commit is contained in:
2025-11-21 15:55:12 +03:00
parent 58df1359e1
commit 1db56d6741
4 changed files with 87 additions and 39 deletions

View File

@@ -26,7 +26,7 @@ func main() {
if err != nil {
log.Fatalf("Failed to connect to database: %v", err)
}
defer services.CloseDB()
// Note: CloseDB is called explicitly in graceful shutdown, not in defer
log.Println("Database connected successfully")
// Initialize Firebase