From 1125e0b7086dd2b71e0558aaf641c23dea02f200 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 23 Aug 2026 13:13:30 +0200 Subject: Apply go fix modernizations and refresh TODO list --- strava/strava.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'strava/strava.go') diff --git a/strava/strava.go b/strava/strava.go index 309d0ee..a619e0a 100644 --- a/strava/strava.go +++ b/strava/strava.go @@ -150,10 +150,7 @@ type RateLimitError struct { func (e *RateLimitError) Error() string { if !e.RetryAfter.IsZero() { - until := time.Until(e.RetryAfter).Truncate(time.Second) - if until < 0 { - until = 0 - } + until := max(time.Until(e.RetryAfter).Truncate(time.Second), 0) scope := "15-minute" if e.IsDaily { scope = "daily" -- cgit v1.3