From 7ea4ee6d222607c11ea86e99a6f6723beeae785d Mon Sep 17 00:00:00 2001 From: Will Norris Date: Mon, 26 Jan 2015 10:08:42 -0800 Subject: [PATCH] fixes for gofmt -s, golint, and go vet --- github/pulls_test.go | 8 ++++---- github/repos_releases.go | 2 +- github/repos_stats_test.go | 2 +- github/search_test.go | 4 ++-- tests/fields/fields.go | 2 +- tests/integration/github_test.go | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/github/pulls_test.go b/github/pulls_test.go index 545c905..d0e976b 100644 --- a/github/pulls_test.go +++ b/github/pulls_test.go @@ -209,7 +209,7 @@ func TestPullRequestsService_ListCommits(t *testing.T) { { SHA: String("3"), Parents: []Commit{ - Commit{ + { SHA: String("2"), }, }, @@ -217,7 +217,7 @@ func TestPullRequestsService_ListCommits(t *testing.T) { { SHA: String("2"), Parents: []Commit{ - Commit{ + { SHA: String("1"), }, }, @@ -265,7 +265,7 @@ func TestPullRequestsService_ListFiles(t *testing.T) { } want := []CommitFile{ - CommitFile{ + { SHA: String("6dcb09b5b57875f334f61aebed695e2e4193db5e"), Filename: String("file1.txt"), Additions: Int(103), @@ -274,7 +274,7 @@ func TestPullRequestsService_ListFiles(t *testing.T) { Status: String("added"), Patch: String("@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"), }, - CommitFile{ + { SHA: String("f61aebed695e2e4193db5e6dcb09b5b57875f334"), Filename: String("file2.txt"), Additions: Int(5), diff --git a/github/repos_releases.go b/github/repos_releases.go index ab54e67..1400114 100644 --- a/github/repos_releases.go +++ b/github/repos_releases.go @@ -49,7 +49,7 @@ type ReleaseAsset struct { DownloadCount *int `json:"download_count,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` - BrowserDownloadUrl *string `json:"browser_download_url,omitempty"` + BrowserDownloadURL *string `json:"browser_download_url,omitempty"` Uploader *User `json:"uploader,omitempty"` } diff --git a/github/repos_stats_test.go b/github/repos_stats_test.go index d5fb5f4..3f9fab5 100644 --- a/github/repos_stats_test.go +++ b/github/repos_stats_test.go @@ -46,7 +46,7 @@ func TestRepositoriesService_ListContributorsStats(t *testing.T) { } want := []ContributorStats{ - ContributorStats{ + { Author: &Contributor{ ID: Int(1), }, diff --git a/github/search_test.go b/github/search_test.go index 225e818..3cfd162 100644 --- a/github/search_test.go +++ b/github/search_test.go @@ -179,9 +179,9 @@ func TestSearchService_CodeTextMatch(t *testing.T) { wantedCodeResult := CodeResult{ Name: String("gopher1"), - TextMatches: []TextMatch{TextMatch{ + TextMatches: []TextMatch{{ Fragment: String("I'm afraid my friend what you have found\nIs a gopher who lives to feed"), - Matches: []Match{Match{Text: String("gopher"), Indices: []int{14, 21}}}, + Matches: []Match{{Text: String("gopher"), Indices: []int{14, 21}}}, }, }, } diff --git a/tests/fields/fields.go b/tests/fields/fields.go index 24c7036..666d432 100644 --- a/tests/fields/fields.go +++ b/tests/fields/fields.go @@ -43,7 +43,7 @@ func main() { token := os.Getenv("GITHUB_AUTH_TOKEN") if token == "" { - println("!!! No OAuth token. Some tests won't run. !!!\n") + print("!!! No OAuth token. Some tests won't run. !!!\n\n") client = github.NewClient(nil) } else { t := &oauth.Transport{ diff --git a/tests/integration/github_test.go b/tests/integration/github_test.go index 1ac6a0b..db31f19 100644 --- a/tests/integration/github_test.go +++ b/tests/integration/github_test.go @@ -28,7 +28,7 @@ var ( func init() { token := os.Getenv("GITHUB_AUTH_TOKEN") if token == "" { - println("!!! No OAuth token. Some tests won't run. !!!\n") + print("!!! No OAuth token. Some tests won't run. !!!\n\n") client = github.NewClient(nil) } else { t := &oauth.Transport{