Browse code

pkg/plugins: rename max/min as it collides with go1.21 builtin

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2023/08/27 02:43:21
Showing 1 changed files
... ...
@@ -239,13 +239,13 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool,
239 239
 }
240 240
 
241 241
 func backoff(retries int) time.Duration {
242
-	b, max := 1, defaultTimeOut
243
-	for b < max && retries > 0 {
242
+	b, maxTimeout := 1, defaultTimeOut
243
+	for b < maxTimeout && retries > 0 {
244 244
 		b *= 2
245 245
 		retries--
246 246
 	}
247
-	if b > max {
248
-		b = max
247
+	if b > maxTimeout {
248
+		b = maxTimeout
249 249
 	}
250 250
 	return time.Duration(b) * time.Second
251 251
 }