aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/show.go16
-rw-r--r--commands/user_ls.go4
2 files changed, 11 insertions, 9 deletions
diff --git a/commands/show.go b/commands/show.go
index 4e6fb177..ae5a15ce 100644
--- a/commands/show.go
+++ b/commands/show.go
@@ -351,7 +351,9 @@ func showOrgmodeFormatter(snapshot *bug.Snapshot) error {
fmt.Printf("* Labels:\n")
if len(labels) > 0 {
- fmt.Printf("** %s", strings.TrimSuffix(strings.Join(labels, "\n **"), "\n **"))
+ fmt.Printf("** %s\n",
+ strings.Join(labels, "\n** "),
+ )
}
// Actors
@@ -363,28 +365,28 @@ func showOrgmodeFormatter(snapshot *bug.Snapshot) error {
)
}
- fmt.Printf("* Actors: %s\n",
- strings.TrimSuffix(strings.Join(actors, "\n **"), "\n **"),
+ fmt.Printf("* Actors:\n** %s\n",
+ strings.Join(actors, "\n** "),
)
// Participants
var participants = make([]string, len(snapshot.Participants))
for i, participant := range snapshot.Participants {
- actors[i] = fmt.Sprintf("%s %s",
+ participants[i] = fmt.Sprintf("%s %s",
participant.Id().Human(),
participant.DisplayName(),
)
}
- fmt.Printf("* Participants: %s\n",
- strings.TrimSuffix(strings.Join(participants, "\n **"), "\n **"),
+ fmt.Printf("* Participants:\n** %s\n",
+ strings.Join(participants, "\n** "),
)
fmt.Printf("* Comments:\n")
for i, comment := range snapshot.Comments {
var message string
- fmt.Printf("** #%d %s [%s]\n",
+ fmt.Printf("** #%d %s\n",
i,
comment.Author.DisplayName(),
)
diff --git a/commands/user_ls.go b/commands/user_ls.go
index 69286172..b0ebfdd5 100644
--- a/commands/user_ls.go
+++ b/commands/user_ls.go
@@ -78,8 +78,8 @@ func NewJSONIdentity(id interface{}) (JSONIdentity, error) {
case cache.LegacyAuthorExcerpt:
i := id.(cache.LegacyAuthorExcerpt)
return JSONIdentity{
- nil,
- nil,
+ "",
+ "",
i.Name,
i.Login,
}, nil