From 9f8d06db415e46a9acb6d992000842fcf1994f02 Mon Sep 17 00:00:00 2001 From: Evgen Kostenko Date: Wed, 15 Jun 2016 20:15:12 +0300 Subject: [PATCH] go fmt boards --- board.go | 1 - board_test.go | 12 +++++------- jira.go | 5 +---- jira_test.go | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/board.go b/board.go index 965704e..4e9ff1c 100644 --- a/board.go +++ b/board.go @@ -48,7 +48,6 @@ type BoardListOptions struct { MaxResults int `url:"maxResults,omitempty"` } - // Get all boards form jira // // JIRA API docs: https://docs.atlassian.com/jira/REST/latest/#api/2/project-getAllProjects diff --git a/board_test.go b/board_test.go index 93dee4b..5c67845 100644 --- a/board_test.go +++ b/board_test.go @@ -1,6 +1,5 @@ package jira - import ( "fmt" "io/ioutil" @@ -48,12 +47,12 @@ func TestBoardsGetFiltered(t *testing.T) { fmt.Fprint(w, string(raw)) }) - boardsListOptions := BoardListOptions { - BoardType: "scrum", - Name: "Test", + boardsListOptions := BoardListOptions{ + BoardType: "scrum", + Name: "Test", ProjectKeyOrId: "TE", - StartAt: 1, - MaxResults: 10, + StartAt: 1, + MaxResults: 10, } projects, _, err := testClient.Board.GetList(&boardsListOptions) @@ -64,4 +63,3 @@ func TestBoardsGetFiltered(t *testing.T) { t.Errorf("Error given: %s", err) } } - diff --git a/jira.go b/jira.go index bdc1724..83d84ea 100644 --- a/jira.go +++ b/jira.go @@ -27,7 +27,7 @@ type Client struct { Authentication *AuthenticationService Issue *IssueService Project *ProjectService - Board *BoardService + Board *BoardService } // NewClient returns a new JIRA API client. @@ -97,7 +97,6 @@ func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Requ return req, nil } - // addOptions adds the parameters in opt as URL query parameters to s. opt // must be a struct whose fields may contain "url" tags. func addOptions(s string, opt interface{}) (string, error) { @@ -172,8 +171,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error) { return resp, err } - - // CheckResponse checks the API response for errors, and returns them if present. // A response is considered an error if it has a status code outside the 200 range. // The caller is responsible to analyze the response body. diff --git a/jira_test.go b/jira_test.go index f87182b..e752494 100644 --- a/jira_test.go +++ b/jira_test.go @@ -8,9 +8,9 @@ import ( "net/http/httptest" "net/url" "reflect" + "strings" "testing" "time" - "strings" ) const (