summaryrefslogtreecommitdiff
path: root/internal/auth/handlers_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-25 20:55:58 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-25 20:55:58 -1000
commitf5b997bfc4c77ef262726d14b30d387eb7acd1c6 (patch)
tree740879da10f3ddcd62bf276cd0632134b53a23c8 /internal/auth/handlers_test.go
parentfa95c71494458070b78270e3d9170076028fc974 (diff)
Fix all static analysis errors (golangci-lint)
- Fix errcheck: handle all error return values in production code - Fix errcheck: handle all error return values in test files - Fix staticcheck: replace deprecated WithCredentialsFile with WithAuthCredentialsFile - Remove unused code: authHeaders, planToEatPlannerItem, planToEatResponse - Use defer func() { _ = x.Close() }() pattern for ignored close errors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/auth/handlers_test.go')
-rw-r--r--internal/auth/handlers_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/auth/handlers_test.go b/internal/auth/handlers_test.go
index 3e154ce..128ae80 100644
--- a/internal/auth/handlers_test.go
+++ b/internal/auth/handlers_test.go
@@ -20,7 +20,7 @@ func TestHandleLogin(t *testing.T) {
if err != nil {
t.Fatalf("an error '%s' was not expected when opening a stub database connection", err)
}
- defer db.Close()
+ defer func() { _ = db.Close() }()
service := NewService(db)
sessionManager := scs.New()
@@ -68,7 +68,7 @@ func TestHandleLogin_InvalidCredentials(t *testing.T) {
if err != nil {
t.Fatalf("an error '%s' was not expected when opening a stub database connection", err)
}
- defer db.Close()
+ defer func() { _ = db.Close() }()
service := NewService(db)
sessionManager := scs.New()