@@ -106,8 +106,8 @@ type Client struct {
106106 clientMu sync.Mutex // clientMu protects the client during calls that modify the CheckRedirect func.
107107 client * http.Client // HTTP client used to communicate with the API.
108108
109- // Base URL for API requests. Defaults to the public GitHub API, but can be
110- // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
109+ // Base URL for API requests. Defaults to the public GitHub API, but can be
110+ // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
111111 // always be specified with a trailing slash.
112112 BaseURL * url.URL
113113
@@ -178,7 +178,7 @@ type RawOptions struct {
178178 Type RawType
179179}
180180
181- // addOptions adds the parameters in opt as URL query parameters to s. opt
181+ // addOptions adds the parameters in opt as URL query parameters to s. opt
182182// must be a struct whose fields may contain "url" tags.
183183func addOptions (s string , opt interface {}) (string , error ) {
184184 v := reflect .ValueOf (opt )
@@ -200,8 +200,8 @@ func addOptions(s string, opt interface{}) (string, error) {
200200 return u .String (), nil
201201}
202202
203- // NewClient returns a new GitHub API client. If a nil httpClient is
204- // provided, http.DefaultClient will be used. To use API methods which require
203+ // NewClient returns a new GitHub API client. If a nil httpClient is
204+ // provided, http.DefaultClient will be used. To use API methods which require
205205// authentication, provide an http.Client that will perform the authentication
206206// for you (such as that provided by the golang.org/x/oauth2 library).
207207func NewClient (httpClient * http.Client ) * Client {
@@ -235,7 +235,7 @@ func NewClient(httpClient *http.Client) *Client {
235235
236236// NewRequest creates an API request. A relative URL can be provided in urlStr,
237237// in which case it is resolved relative to the BaseURL of the Client.
238- // Relative URLs should always be specified without a preceding slash. If
238+ // Relative URLs should always be specified without a preceding slash. If
239239// specified, the value pointed to by body is JSON encoded and included as the
240240// request body.
241241func (c * Client ) NewRequest (method , urlStr string , body interface {}) (* http.Request , error ) {
@@ -295,14 +295,14 @@ func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, m
295295 return req , nil
296296}
297297
298- // Response is a GitHub API response. This wraps the standard http.Response
298+ // Response is a GitHub API response. This wraps the standard http.Response
299299// returned from GitHub and provides convenient access to things like
300300// pagination links.
301301type Response struct {
302302 * http.Response
303303
304304 // These fields provide the page values for paginating through a set of
305- // results. Any or all of these may be set to the zero value for
305+ // results. Any or all of these may be set to the zero value for
306306 // responses that are not part of a paginated set, or for which there
307307 // are no additional pages.
308308
@@ -384,7 +384,7 @@ func parseRate(r *http.Response) Rate {
384384}
385385
386386// Rate specifies the current rate limit for the client as determined by the
387- // most recent API call. If the client is used in a multi-user application,
387+ // most recent API call. If the client is used in a multi-user application,
388388// this rate may not always be up-to-date.
389389//
390390// Deprecated: Use the Response.Rate returned from most recent API call instead.
@@ -396,11 +396,11 @@ func (c *Client) Rate() Rate {
396396 return rate
397397}
398398
399- // Do sends an API request and returns the API response. The API response is
399+ // Do sends an API request and returns the API response. The API response is
400400// JSON decoded and stored in the value pointed to by v, or returned as an
401- // error if an API error has occurred. If v implements the io.Writer
401+ // error if an API error has occurred. If v implements the io.Writer
402402// interface, the raw response body will be written to v, without attempting to
403- // first decode it. If rate limit is exceeded and reset time is in the future,
403+ // first decode it. If rate limit is exceeded and reset time is in the future,
404404// Do returns *RateLimitError immediately without making a network API call.
405405func (c * Client ) Do (req * http.Request , v interface {}) (* Response , error ) {
406406 rateLimitCategory := category (req .URL .Path )
@@ -511,7 +511,7 @@ func (r *ErrorResponse) Error() string {
511511}
512512
513513// TwoFactorAuthError occurs when using HTTP Basic Authentication for a user
514- // that has two-factor authentication enabled. The request can be reattempted
514+ // that has two-factor authentication enabled. The request can be reattempted
515515// by providing a one-time password in the request.
516516type TwoFactorAuthError ErrorResponse
517517
@@ -609,7 +609,7 @@ func (e *Error) Error() string {
609609// present. A response is considered an error if it has a status code outside
610610// the 200 range or equal to 202 Accepted.
611611// API error responses are expected to have either no response
612- // body, or a JSON response body that maps to ErrorResponse. Any other
612+ // body, or a JSON response body that maps to ErrorResponse. Any other
613613// response body will be silently ignored.
614614//
615615// The error type will be *RateLimitError for rate limit exceeded errors,
@@ -658,15 +658,15 @@ func CheckResponse(r *http.Response) error {
658658// parseBoolResponse determines the boolean result from a GitHub API response.
659659// Several GitHub API methods return boolean responses indicated by the HTTP
660660// status code in the response (true indicated by a 204, false indicated by a
661- // 404). This helper function will determine that result and hide the 404
662- // error if present. Any other error will be returned through as-is.
661+ // 404). This helper function will determine that result and hide the 404
662+ // error if present. Any other error will be returned through as-is.
663663func parseBoolResponse (err error ) (bool , error ) {
664664 if err == nil {
665665 return true , nil
666666 }
667667
668668 if err , ok := err .(* ErrorResponse ); ok && err .Response .StatusCode == http .StatusNotFound {
669- // Simply false. In this one case, we do not pass the error through.
669+ // Simply false. In this one case, we do not pass the error through.
670670 return false , nil
671671 }
672672
@@ -692,15 +692,15 @@ func (r Rate) String() string {
692692
693693// RateLimits represents the rate limits for the current client.
694694type RateLimits struct {
695- // The rate limit for non-search API requests. Unauthenticated
696- // requests are limited to 60 per hour. Authenticated requests are
695+ // The rate limit for non-search API requests. Unauthenticated
696+ // requests are limited to 60 per hour. Authenticated requests are
697697 // limited to 5,000 per hour.
698698 //
699699 // GitHub API docs: https://developer.github.com/v3/#rate-limiting
700700 Core * Rate `json:"core"`
701701
702- // The rate limit for search API requests. Unauthenticated requests
703- // are limited to 10 requests per minutes. Authenticated requests are
702+ // The rate limit for search API requests. Unauthenticated requests
703+ // are limited to 10 requests per minutes. Authenticated requests are
704704 // limited to 30 per minute.
705705 //
706706 // GitHub API docs: https://developer.github.com/v3/search/#rate-limit
@@ -838,7 +838,7 @@ func (t *UnauthenticatedRateLimitedTransport) transport() http.RoundTripper {
838838}
839839
840840// BasicAuthTransport is an http.RoundTripper that authenticates all requests
841- // using HTTP Basic Authentication with the provided username and password. It
841+ // using HTTP Basic Authentication with the provided username and password. It
842842// additionally supports users who have two-factor authentication enabled on
843843// their GitHub account.
844844type BasicAuthTransport struct {
0 commit comments