From c34dcac4f1577655c642a92eae0d19264832c6b3 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 18 Feb 2017 16:33:01 -0500 Subject: [PATCH] Remove unused Client.mostRecent. This is a followup to #555. mostRecent was created specifically to support Rate method in #347. That method is now gone (removed in #555), so mostRecent is unused and can be safely removed. --- github/github.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/github/github.go b/github/github.go index 379ec06d9e6..0f3145ab970 100644 --- a/github/github.go +++ b/github/github.go @@ -114,7 +114,6 @@ type Client struct { rateMu sync.Mutex rateLimits [categories]Rate // Rate limits for the client as determined by the most recent API calls. - mostRecent rateLimitCategory common service // Reuse a single struct instead of allocating one for each service on the heap. @@ -413,7 +412,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { c.rateMu.Lock() c.rateLimits[rateLimitCategory] = response.Rate - c.mostRecent = rateLimitCategory c.rateMu.Unlock() err = CheckResponse(resp)