From 59c7f03d6871bb2d61cf6b3f67c3197364682e79 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 9 Jul 2016 00:04:14 -0700 Subject: [PATCH] Put sync.Mutex on top of variables it protects. This change makes the code more consistent with the rateMu below. This is a followup to https://github.com/google/go-github/pull/390#discussion_r68863652. --- github/github.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/github/github.go b/github/github.go index 49bb74bf1c2..deb3c163445 100644 --- a/github/github.go +++ b/github/github.go @@ -88,10 +88,8 @@ const ( // A Client manages communication with the GitHub API. type Client struct { - // HTTP client used to communicate with the API. - client *http.Client - // clientMu protects the client during calls that modify the CheckRedirect func. - clientMu sync.Mutex + clientMu sync.Mutex // clientMu protects the client during calls that modify the CheckRedirect func. + client *http.Client // HTTP client used to communicate with the API. // Base URL for API requests. Defaults to the public GitHub API, but can be // set to a domain endpoint to use with GitHub Enterprise. BaseURL should