From 65772dc8ccdfdc17ce9a9132684cb7b24f8424d1 Mon Sep 17 00:00:00 2001 From: Castor <68530221+castor-rtzr@users.noreply.github.com> Date: Thu, 9 Sep 2021 21:58:28 +0900 Subject: [PATCH 1/2] Update comment align with code --- internal/http_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/http_client.go b/internal/http_client.go index 77a1c851..7f85b1b2 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -70,8 +70,8 @@ func NewHTTPClient(ctx context.Context, opts ...option.ClientOption) (*HTTPClien // RetryConfig. // // The default RetryConfig retries requests on all low-level network errors as well as on HTTP -// InternalServerError (500) and ServiceUnavailable (503) errors. Repeatedly failing requests are -// retried up to 4 times with exponential backoff. Retry delay is never longer than 2 minutes. +// ServiceUnavailable (503) error. Repeatedly failing requests are retried up to 4 times +// with exponential backoff. Retry delay is never longer than 2 minutes. func WithDefaultRetryConfig(hc *http.Client) *HTTPClient { twoMinutes := time.Duration(2) * time.Minute return &HTTPClient{ From 3bc5257538ae68d6e2f1f05e1377c33d6fba0e6d Mon Sep 17 00:00:00 2001 From: Castor Date: Sun, 12 Sep 2021 15:52:24 +0900 Subject: [PATCH 2/2] remove trailling space using by gofmt --- internal/http_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http_client.go b/internal/http_client.go index 7f85b1b2..280aecc4 100644 --- a/internal/http_client.go +++ b/internal/http_client.go @@ -70,7 +70,7 @@ func NewHTTPClient(ctx context.Context, opts ...option.ClientOption) (*HTTPClien // RetryConfig. // // The default RetryConfig retries requests on all low-level network errors as well as on HTTP -// ServiceUnavailable (503) error. Repeatedly failing requests are retried up to 4 times +// ServiceUnavailable (503) error. Repeatedly failing requests are retried up to 4 times // with exponential backoff. Retry delay is never longer than 2 minutes. func WithDefaultRetryConfig(hc *http.Client) *HTTPClient { twoMinutes := time.Duration(2) * time.Minute