Skip to content

Commit eb81d96

Browse files
muesligmlewis
authored andcommitted
Use time.Until (#1233)
1 parent 74c3124 commit eb81d96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ type RateLimitError struct {
649649
func (r *RateLimitError) Error() string {
650650
return fmt.Sprintf("%v %v: %d %v %v",
651651
r.Response.Request.Method, sanitizeURL(r.Response.Request.URL),
652-
r.Response.StatusCode, r.Message, formatRateReset(r.Rate.Reset.Time.Sub(time.Now())))
652+
r.Response.StatusCode, r.Message, formatRateReset(time.Until(r.Rate.Reset.Time)))
653653
}
654654

655655
// AcceptedError occurs when GitHub returns 202 Accepted response with an

0 commit comments

Comments
 (0)