Skip to content

Commit

Permalink
more go doc
Browse files Browse the repository at this point in the history
  • Loading branch information
danaelhe committed Aug 24, 2023
1 parent 2589968 commit bba5ad2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion godo.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ func configureRetryableClient(c *Client, httpClient *http.Client) *http.Client {
}

// NewFromToken returns a new DigitalOcean API client with the given API
// token.
// token. Creating a new DigitalOcean API Client with NewFromToken
// enables retries and backoffs by default for requests that fail with 429
// or 500-level response codes using the go-retryablehttp client.
func NewFromToken(token string) *Client {
cleanToken := strings.Trim(strings.TrimSpace(token), "'")
ctx := context.Background()
Expand Down

0 comments on commit bba5ad2

Please sign in to comment.