Add simple colors to list command
This commit is contained in:
parent
0cff217a8b
commit
ce96e712e4
1 changed files with 4 additions and 4 deletions
|
@ -93,17 +93,17 @@ func (c *Campaign) PrintList() {
|
||||||
if t.IsPublishedJira() {
|
if t.IsPublishedJira() {
|
||||||
var str string
|
var str string
|
||||||
if t.IsPublishedGithub() {
|
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 {
|
} else {
|
||||||
str = fmt.Sprintf("[%s] %s", t.JiraLink, t.Summary)
|
str = fmt.Sprintf("[%s] %s", color.BlueString(t.JiraLink), t.Summary)
|
||||||
}
|
}
|
||||||
if t.GithubStatus != "" {
|
if t.GithubStatus != "" {
|
||||||
str += fmt.Sprintf(" (%s)", t.GithubStatus)
|
str += fmt.Sprintf(" (%s)", color.MagentaString(t.GithubStatus))
|
||||||
}
|
}
|
||||||
fmt.Println(str)
|
fmt.Println(str)
|
||||||
} else {
|
} else {
|
||||||
b, _ := json.Marshal(t)
|
b, _ := json.Marshal(t)
|
||||||
fmt.Printf("unpublished: %s\n", string(b))
|
fmt.Printf("unpublished: %s\n", color.YellowString(string(b)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue