Couple of fixes

This commit is contained in:
Ben Sarmiento
2023-11-10 21:25:53 +01:00
parent b97f859a32
commit ab31114f2e
7 changed files with 131 additions and 152 deletions

View File

@@ -29,10 +29,10 @@ func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
return resp, err
}
func NewHTTPClient(token string, maxRetries int, timeout time.Duration) *HTTPClient {
func NewHTTPClient(token string, maxRetries int) *HTTPClient {
return &HTTPClient{
BearerToken: token,
Client: &http.Client{Timeout: timeout},
Client: &http.Client{},
MaxRetries: maxRetries,
Backoff: func(attempt int) time.Duration {
return time.Duration(attempt) * time.Second