(ctx context.Context, backoff time.Duration)
| 637 | } |
| 638 | |
| 639 | func (c *Client) waitForRetry(ctx context.Context, backoff time.Duration) (time.Duration, error) { |
| 640 | if err := c.sleep(ctx, backoff); err != nil { |
| 641 | return 0, fmt.Errorf("github: retry wait aborted: %w", err) |
| 642 | } |
| 643 | return nextBackoff(backoff, c.maxBackoff), nil |
| 644 | } |
| 645 | |
| 646 | func shouldRetryStatus(statusCode int) bool { |
| 647 | return statusCode == http.StatusTooManyRequests || statusCode >= http.StatusInternalServerError |
no test coverage detected