From 0f5b2f67bbe443b63b7d975025661fc702cc0892 Mon Sep 17 00:00:00 2001 From: Leandro Barbosa Date: Fri, 13 Feb 2026 12:26:44 -0300 Subject: [PATCH] style: fix gofmt formatting in cooldown files Remove extra spaces in comment alignment to pass fmt-check CI. --- pkg/providers/cooldown.go | 4 ++-- pkg/providers/cooldown_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/providers/cooldown.go b/pkg/providers/cooldown.go index 6811297f0..b0d8608dc 100644 --- a/pkg/providers/cooldown.go +++ b/pkg/providers/cooldown.go @@ -196,8 +196,8 @@ func calculateStandardCooldown(errorCount int) time.Duration { // 3 errors → 20 hours // 4+ errors → 24 hours (cap) func calculateBillingCooldown(billingErrorCount int) time.Duration { - const baseMs = 5 * 60 * 60 * 1000 // 5 hours - const maxMs = 24 * 60 * 60 * 1000 // 24 hours + const baseMs = 5 * 60 * 60 * 1000 // 5 hours + const maxMs = 24 * 60 * 60 * 1000 // 24 hours n := max(1, billingErrorCount) exp := min(n-1, 10) diff --git a/pkg/providers/cooldown_test.go b/pkg/providers/cooldown_test.go index e51ff40e5..47f43ad5c 100644 --- a/pkg/providers/cooldown_test.go +++ b/pkg/providers/cooldown_test.go @@ -184,7 +184,7 @@ func TestCooldown_BillingTakesPrecedence(t *testing.T) { // Standard cooldown (1 min) + billing disable (5h) ct.MarkFailure("openai", FailoverRateLimit) // 1 min cooldown - ct.MarkFailure("openai", FailoverBilling) // 5h disable + ct.MarkFailure("openai", FailoverBilling) // 5h disable // After 2 min: standard cooldown expired but billing still active *current = now.Add(2 * time.Minute)