瀏覽代碼

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 年之前
父節點
當前提交
df2f25a977
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      pkg/plugins/client.go

+ 4 - 4
pkg/plugins/client.go

@@ -239,13 +239,13 @@ func (c *Client) callWithRetry(serviceMethod string, data io.Reader, retry bool,
 }
 
 func backoff(retries int) time.Duration {
-	b, max := 1, defaultTimeOut
-	for b < max && retries > 0 {
+	b, maxTimeout := 1, defaultTimeOut
+	for b < maxTimeout && retries > 0 {
 		b *= 2
 		retries--
 	}
-	if b > max {
-		b = max
+	if b > maxTimeout {
+		b = maxTimeout
 	}
 	return time.Duration(b) * time.Second
 }