aboutsummaryrefslogtreecommitdiffstats
path: root/commands/show.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-04-03 21:05:58 +0200
committerMichael Muré <batolettre@gmail.com>2019-04-03 21:07:15 +0200
commita64aaacc03a00394ea172d99e23b96ae11d9c1c9 (patch)
treeab214b25a0e35a8961f1d18ed429e94ecdcef393 /commands/show.go
parent96987bf6ae528024b1c34006ce7820e3144f3914 (diff)
downloadgit-bug-a64aaacc03a00394ea172d99e23b96ae11d9c1c9.tar.gz
commands: fix labels no showing properly in "git bug show <id> -f labels"
fix #119
Diffstat (limited to 'commands/show.go')
-rw-r--r--commands/show.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands/show.go b/commands/show.go
index c62db1a1..7d7aafbf 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -32,7 +32,7 @@ func runShowBug(cmd *cobra.Command, args []string) error {
snapshot := b.Snapshot()
if len(snapshot.Comments) == 0 {
- return errors.New("Invalid bug: no comment")
+ return errors.New("invalid bug: no comment")
}
firstComment := snapshot.Comments[0]
@@ -49,7 +49,10 @@ func runShowBug(cmd *cobra.Command, args []string) error {
fmt.Printf("%s\n", snapshot.Id())
case "labels":
var labels = make([]string, len(snapshot.Labels))
- fmt.Printf("%s\n", strings.Join(labels, ", "))
+ for i, l := range snapshot.Labels {
+ labels[i] = string(l)
+ }
+ fmt.Printf("%s\n", strings.Join(labels, "\n"))
case "shortId":
fmt.Printf("%s\n", snapshot.HumanId())
case "status":