From 697bca38ea77dd822906c426e4c37644675fb0a9 Mon Sep 17 00:00:00 2001 From: Michael Whatcott Date: Tue, 23 Jul 2024 16:50:02 -0600 Subject: [PATCH] Go 1.21 ships with built-in min and max functions. - https://go.dev/doc/go1.21 - https://pkg.go.dev/builtin#max - https://pkg.go.dev/builtin#min --- internal/sdk/retry_client.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/internal/sdk/retry_client.go b/internal/sdk/retry_client.go index 11c408d..e630b1d 100644 --- a/internal/sdk/retry_client.go +++ b/internal/sdk/retry_client.go @@ -124,20 +124,6 @@ func (r *RetryClient) random(cap int) int { return r.rand.Intn(cap) } -func max(x, y int) int { - if x > y { - return x - } - return y -} - -func min(x, y int) int { - if x < y { - return x - } - return y -} - const ( backOffRateLimit = 5 maxBackOffDuration = 10