diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-23 13:13:30 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-23 13:13:30 +0200 |
| commit | 1125e0b7086dd2b71e0558aaf641c23dea02f200 (patch) | |
| tree | 9113903e7d722dd2b5ea0f419f33d7705978e2c9 /strava | |
| parent | 2a6189bda8dd9f39d9177ffca2330101e914d8f0 (diff) | |
Apply go fix modernizations and refresh TODO list
Diffstat (limited to 'strava')
| -rw-r--r-- | strava/strava.go | 5 |
1 files changed, 1 insertions, 4 deletions
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" |
