From ce96e712e46346c019d5ee7dfc1c78426a960e59 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Wed, 7 Oct 2020 20:00:55 +0200 Subject: [PATCH] Add simple colors to list command --- model/campaign.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model/campaign.go b/model/campaign.go index e971f94..9de5fbb 100644 --- a/model/campaign.go +++ b/model/campaign.go @@ -93,17 +93,17 @@ func (c *Campaign) PrintList() { if t.IsPublishedJira() { var str string if t.IsPublishedGithub() { - str = fmt.Sprintf("[%s / #%d] %s", t.JiraLink, t.GithubLink, t.Summary) + str = fmt.Sprintf("[%s / %s] %s", color.BlueString(t.JiraLink), color.CyanString(fmt.Sprintf("#%d", t.GithubLink)), t.Summary) } else { - str = fmt.Sprintf("[%s] %s", t.JiraLink, t.Summary) + str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary) } if t.GithubStatus != "" { - str += fmt.Sprintf(" (%s)", t.GithubStatus) + str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus)) } fmt.Println(str) } else { b, _ := json.Marshal(t) - fmt.Printf("unpublished: %s\n", string(b)) + fmt.Printf("unpublished: %s\n", color.YellowString(string(b))) } } }