From f5b997bfc4c77ef262726d14b30d387eb7acd1c6 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 25 Jan 2026 20:55:58 -1000 Subject: 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 --- internal/handlers/tab_state_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/handlers/tab_state_test.go') diff --git a/internal/handlers/tab_state_test.go b/internal/handlers/tab_state_test.go index 60f1340..71c6ed8 100644 --- a/internal/handlers/tab_state_test.go +++ b/internal/handlers/tab_state_test.go @@ -17,7 +17,7 @@ func TestHandleDashboard_TabState(t *testing.T) { if err != nil { t.Fatalf("Failed to create test database: %v", err) } - defer db.Close() + defer func() { _ = db.Close() }() // Create mock API clients todoistClient := api.NewTodoistClient("test-key") @@ -75,7 +75,7 @@ func TestHandleDashboard_TabState(t *testing.T) { h.HandleDashboard(w, req) resp := w.Result() - defer resp.Body.Close() + defer func() { _ = resp.Body.Close() }() if resp.StatusCode != http.StatusOK { t.Errorf("Expected status 200, got %d", resp.StatusCode) -- cgit v1.2.3