diff --git a/issue.go b/issue.go index e014354..6ca89e0 100644 --- a/issue.go +++ b/issue.go @@ -2,16 +2,16 @@ package jkl import ( "bytes" + "encoding/json" "errors" "fmt" "log" "os" "reflect" - "strings" - "encoding/json" - "text/template" - "sort" "regexp" + "sort" + "strings" + "text/template" ) type Search struct { @@ -20,6 +20,7 @@ type Search struct { type IssueType struct { Name string `json:"name"` + IconURL string `json:",omitempty"` Fields map[string]*FieldSpec } @@ -92,6 +93,7 @@ type CommentColl struct { type Status struct { Name string + IconURL string `json:",omitempty"` } type TimeTracking struct { diff --git a/jkl.go b/jkl.go index 04715ce..7823de3 100644 --- a/jkl.go +++ b/jkl.go @@ -15,6 +15,11 @@ import ( "github.com/joho/godotenv" ) +func init() { + x := false + Verbose = &x +} + var Verbose *bool var defaultIssue = &JiraIssue{} @@ -61,9 +66,10 @@ func GetCreateMeta(projectKey, issueType string) (*CreateMeta, error) { return nil, err } b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, err - } + + if err != nil { + return nil, err + } if resp.StatusCode >= 400 { fmt.Println("Status code:", resp.StatusCode) fmt.Println("Response:") @@ -134,7 +140,8 @@ func List(jql string) ([]*JiraIssue, error) { func GetIssue(taskKey string) (*JiraIssue, error) { bootHttpClient() - path := "api/2/issue/" + taskKey+"?expand=transitions,operations,editmeta" + + path := "api/2/issue/" + taskKey + "?expand=transitions,operations,editmeta" resp, err := httpClient.Get(path) if err != nil { return nil, err