MCPcopy Index your code
hub / github.com/google/go-github / Is

Method Is

github/github.go:1541–1550  ·  view source on GitHub ↗

Is returns whether the provided error equals this error.

(target error)

Source from the content-addressed store, hash-verified

1539
1540// Is returns whether the provided error equals this error.
1541func (r *RateLimitError) Is(target error) bool {
1542 var v *RateLimitError
1543 if !errors.As(target, &v) {
1544 return false
1545 }
1546
1547 return r.Rate == v.Rate &&
1548 r.Message == v.Message &&
1549 compareHTTPResponse(r.Response, v.Response)
1550}
1551
1552// AcceptedError occurs when GitHub returns 202 Accepted response with an
1553// empty body, which means a job was scheduled on the GitHub side to process

Callers

nothing calls this directly

Calls 1

compareHTTPResponseFunction · 0.85

Tested by

no test coverage detected