From 04b8c88e2f2840f50f69c36e1057af794e6ddc1a Mon Sep 17 00:00:00 2001 From: Will Norris Date: Wed, 4 Sep 2013 15:20:42 -0700 Subject: [PATCH] sort service fields --- github/github.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/github/github.go b/github/github.go index f51a612..a9977b7 100644 --- a/github/github.go +++ b/github/github.go @@ -49,17 +49,16 @@ type Client struct { // current rate. Rate Rate - // Services used for talking to different parts of the API - + // Services used for talking to different parts of the GitHub API. + Activity *ActivityService + Gists *GistsService + Git *GitService Issues *IssuesService Organizations *OrganizationsService PullRequests *PullRequestsService Repositories *RepositoriesService - Git *GitService - Users *UsersService - Gists *GistsService - Activity *ActivityService Search *SearchService + Users *UsersService } // ListOptions specifies the optional parameters to various List methods that @@ -80,15 +79,15 @@ func NewClient(httpClient *http.Client) *Client { baseURL, _ := url.Parse(defaultBaseURL) c := &Client{client: httpClient, BaseURL: baseURL, UserAgent: userAgent} + c.Activity = &ActivityService{client: c} + c.Gists = &GistsService{client: c} + c.Git = &GitService{client: c} c.Issues = &IssuesService{client: c} c.Organizations = &OrganizationsService{client: c} c.PullRequests = &PullRequestsService{client: c} c.Repositories = &RepositoriesService{client: c} - c.Git = &GitService{client: c} - c.Users = &UsersService{client: c} - c.Gists = &GistsService{client: c} - c.Activity = &ActivityService{client: c} c.Search = &SearchService{client: c} + c.Users = &UsersService{client: c} return c }