From 3e167707c0e7fec4ff2e1afde8e923dc934d2a70 Mon Sep 17 00:00:00 2001 From: Glenn Lewis Date: Fri, 17 Jun 2016 08:48:27 -0700 Subject: [PATCH] remove unnecessary newlines Change-Id: I7bf843b42a0d8869e72b6d0606bdc99893b10bdb --- github/activity_watching_test.go | 1 - github/gists_comments_test.go | 2 -- github/gists_test.go | 6 ------ github/git_tags_test.go | 1 - github/github_test.go | 4 ---- github/issues_events_test.go | 3 --- github/issues_test.go | 1 - github/pulls.go | 1 - github/pulls_comments_test.go | 5 ----- github/pulls_test.go | 4 ---- github/repos_test.go | 1 - 11 files changed, 29 deletions(-) diff --git a/github/activity_watching_test.go b/github/activity_watching_test.go index a8a4a46..08c8a02 100644 --- a/github/activity_watching_test.go +++ b/github/activity_watching_test.go @@ -73,7 +73,6 @@ func TestActivityService_ListWatched_specifiedUser(t *testing.T) { }) watched, _, err := client.Activity.ListWatched("u", &ListOptions{Page: 2}) - if err != nil { t.Errorf("Activity.ListWatched returned error: %v", err) } diff --git a/github/gists_comments_test.go b/github/gists_comments_test.go index b2bbf23..d5877de 100644 --- a/github/gists_comments_test.go +++ b/github/gists_comments_test.go @@ -25,7 +25,6 @@ func TestGistsService_ListComments(t *testing.T) { opt := &ListOptions{Page: 2} comments, _, err := client.Gists.ListComments("1", opt) - if err != nil { t.Errorf("Gists.Comments returned error: %v", err) } @@ -51,7 +50,6 @@ func TestGistsService_GetComment(t *testing.T) { }) comment, _, err := client.Gists.GetComment("1", 2) - if err != nil { t.Errorf("Gists.GetComment returned error: %v", err) } diff --git a/github/gists_test.go b/github/gists_test.go index 5731201..a9e03be 100644 --- a/github/gists_test.go +++ b/github/gists_test.go @@ -30,7 +30,6 @@ func TestGistsService_List_specifiedUser(t *testing.T) { opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} gists, _, err := client.Gists.List("u", opt) - if err != nil { t.Errorf("Gists.List returned error: %v", err) } @@ -82,7 +81,6 @@ func TestGistsService_ListAll(t *testing.T) { opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} gists, _, err := client.Gists.ListAll(opt) - if err != nil { t.Errorf("Gists.ListAll returned error: %v", err) } @@ -109,7 +107,6 @@ func TestGistsService_ListStarred(t *testing.T) { opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} gists, _, err := client.Gists.ListStarred(opt) - if err != nil { t.Errorf("Gists.ListStarred returned error: %v", err) } @@ -130,7 +127,6 @@ func TestGistsService_Get(t *testing.T) { }) gist, _, err := client.Gists.Get("1") - if err != nil { t.Errorf("Gists.Get returned error: %v", err) } @@ -156,7 +152,6 @@ func TestGistsService_GetRevision(t *testing.T) { }) gist, _, err := client.Gists.GetRevision("1", "s") - if err != nil { t.Errorf("Gists.Get returned error: %v", err) } @@ -394,7 +389,6 @@ func TestGistsService_Fork(t *testing.T) { }) gist, _, err := client.Gists.Fork("1") - if err != nil { t.Errorf("Gists.Fork returned error: %v", err) } diff --git a/github/git_tags_test.go b/github/git_tags_test.go index 5997e8d..c44361d 100644 --- a/github/git_tags_test.go +++ b/github/git_tags_test.go @@ -25,7 +25,6 @@ func TestGitService_GetTag(t *testing.T) { }) tag, _, err := client.Git.GetTag("o", "r", "s") - if err != nil { t.Errorf("Git.GetTag returned error: %v", err) } diff --git a/github/github_test.go b/github/github_test.go index d404a00..39b0766 100644 --- a/github/github_test.go +++ b/github/github_test.go @@ -397,7 +397,6 @@ func TestDo_rateLimit(t *testing.T) { req, _ := client.NewRequest("GET", "/", nil) _, err := client.Do(req, nil) - if err != nil { t.Errorf("Do returned unexpected error: %v", err) } @@ -551,7 +550,6 @@ func TestDo_noContent(t *testing.T) { req, _ := client.NewRequest("GET", "/", nil) _, err := client.Do(req, &body) - if err != nil { t.Fatalf("Do returned unexpected error: %v", err) } @@ -630,7 +628,6 @@ func TestCheckResponse_noBody(t *testing.T) { func TestParseBooleanResponse_true(t *testing.T) { result, err := parseBoolResponse(nil) - if err != nil { t.Errorf("parseBoolResponse returned error: %+v", err) } @@ -643,7 +640,6 @@ func TestParseBooleanResponse_true(t *testing.T) { func TestParseBooleanResponse_false(t *testing.T) { v := &ErrorResponse{Response: &http.Response{StatusCode: http.StatusNotFound}} result, err := parseBoolResponse(v) - if err != nil { t.Errorf("parseBoolResponse returned error: %+v", err) } diff --git a/github/issues_events_test.go b/github/issues_events_test.go index f90b64a..4594b87 100644 --- a/github/issues_events_test.go +++ b/github/issues_events_test.go @@ -27,7 +27,6 @@ func TestIssuesService_ListIssueEvents(t *testing.T) { opt := &ListOptions{Page: 1, PerPage: 2} events, _, err := client.Issues.ListIssueEvents("o", "r", 1, opt) - if err != nil { t.Errorf("Issues.ListIssueEvents returned error: %v", err) } @@ -53,7 +52,6 @@ func TestIssuesService_ListRepositoryEvents(t *testing.T) { opt := &ListOptions{Page: 1, PerPage: 2} events, _, err := client.Issues.ListRepositoryEvents("o", "r", opt) - if err != nil { t.Errorf("Issues.ListRepositoryEvents returned error: %v", err) } @@ -74,7 +72,6 @@ func TestIssuesService_GetEvent(t *testing.T) { }) event, _, err := client.Issues.GetEvent("o", "r", 1) - if err != nil { t.Errorf("Issues.GetEvent returned error: %v", err) } diff --git a/github/issues_test.go b/github/issues_test.go index adc363a..1dcdb90 100644 --- a/github/issues_test.go +++ b/github/issues_test.go @@ -40,7 +40,6 @@ func TestIssuesService_List_all(t *testing.T) { ListOptions{Page: 1, PerPage: 2}, } issues, _, err := client.Issues.List(true, opt) - if err != nil { t.Errorf("Issues.List returned error: %v", err) } diff --git a/github/pulls.go b/github/pulls.go index 722ffec..7b7cebc 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -272,7 +272,6 @@ func (s *PullRequestsService) Merge(owner string, repo string, number int, commi // TODO: This header will be unnecessary when the API is no longer in preview. req.Header.Set("Accept", mediaTypeSquashPreview) - if err != nil { return nil, nil, err } diff --git a/github/pulls_comments_test.go b/github/pulls_comments_test.go index 8882456..db0f309 100644 --- a/github/pulls_comments_test.go +++ b/github/pulls_comments_test.go @@ -37,7 +37,6 @@ func TestPullRequestsService_ListComments_allPulls(t *testing.T) { ListOptions: ListOptions{Page: 2}, } pulls, _, err := client.PullRequests.ListComments("o", "r", 0, opt) - if err != nil { t.Errorf("PullRequests.ListComments returned error: %v", err) } @@ -59,7 +58,6 @@ func TestPullRequestsService_ListComments_specificPull(t *testing.T) { }) pulls, _, err := client.PullRequests.ListComments("o", "r", 1, nil) - if err != nil { t.Errorf("PullRequests.ListComments returned error: %v", err) } @@ -86,7 +84,6 @@ func TestPullRequestsService_GetComment(t *testing.T) { }) comment, _, err := client.PullRequests.GetComment("o", "r", 1) - if err != nil { t.Errorf("PullRequests.GetComment returned error: %v", err) } @@ -121,7 +118,6 @@ func TestPullRequestsService_CreateComment(t *testing.T) { }) comment, _, err := client.PullRequests.CreateComment("o", "r", 1, input) - if err != nil { t.Errorf("PullRequests.CreateComment returned error: %v", err) } @@ -156,7 +152,6 @@ func TestPullRequestsService_EditComment(t *testing.T) { }) comment, _, err := client.PullRequests.EditComment("o", "r", 1, input) - if err != nil { t.Errorf("PullRequests.EditComment returned error: %v", err) } diff --git a/github/pulls_test.go b/github/pulls_test.go index 4603dd3..da66115 100644 --- a/github/pulls_test.go +++ b/github/pulls_test.go @@ -32,7 +32,6 @@ func TestPullRequestsService_List(t *testing.T) { opt := &PullRequestListOptions{"closed", "h", "b", "created", "desc", ListOptions{Page: 2}} pulls, _, err := client.PullRequests.List("o", "r", opt) - if err != nil { t.Errorf("PullRequests.List returned error: %v", err) } @@ -58,7 +57,6 @@ func TestPullRequestsService_Get(t *testing.T) { }) pull, _, err := client.PullRequests.Get("o", "r", 1) - if err != nil { t.Errorf("PullRequests.Get returned error: %v", err) } @@ -79,7 +77,6 @@ func TestPullRequestsService_Get_headAndBase(t *testing.T) { }) pull, _, err := client.PullRequests.Get("o", "r", 1) - if err != nil { t.Errorf("PullRequests.Get returned error: %v", err) } @@ -112,7 +109,6 @@ func TestPullRequestService_Get_DiffURLAndPatchURL(t *testing.T) { }) pull, _, err := client.PullRequests.Get("o", "r", 1) - if err != nil { t.Errorf("PullRequests.Get returned error: %v", err) } diff --git a/github/repos_test.go b/github/repos_test.go index 4544c55..e996dd6 100644 --- a/github/repos_test.go +++ b/github/repos_test.go @@ -297,7 +297,6 @@ func TestRepositoriesService_ListContributors(t *testing.T) { opts := &ListContributorsOptions{Anon: "true", ListOptions: ListOptions{Page: 2}} contributors, _, err := client.Repositories.ListContributors("o", "r", opts) - if err != nil { t.Errorf("Repositories.ListContributors returned error: %v", err) }