소스 검색

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 {
 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
 		b *= 2
 		retries--
 		retries--
 	}
 	}
-	if b > max {
-		b = max
+	if b > maxTimeout {
+		b = maxTimeout
 	}
 	}
 	return time.Duration(b) * time.Second
 	return time.Duration(b) * time.Second
 }
 }