chore: go fixes

This commit is contained in:
2026-05-02 18:58:13 +02:00
parent b7fee9d063
commit f0b5a4f9a8
8 changed files with 19 additions and 41 deletions

View File

@@ -65,10 +65,7 @@ func retryBackoff(attempts int64) string {
delay := time.Minute
if attempts > 1 {
shift := attempts - 1
if shift > 6 {
shift = 6
}
shift := min(attempts-1, 6)
delay = time.Minute * time.Duration(1<<shift)
}
@@ -76,10 +73,7 @@ func retryBackoff(attempts int64) string {
delay = 30 * time.Minute
}
minutes := int(delay / time.Minute)
if minutes < 1 {
minutes = 1
}
minutes := max(int(delay/time.Minute), 1)
return fmt.Sprintf("+%d minutes", minutes)
}