diff --git a/commands/show.go b/commands/show.go index 4e6fb1771781a30d23d40d97b247935deb551cdb..ae5a15cecd8214d87605c0c534bbdda8be6f5ba2 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 692861724b41287ace4a29bbcca15d8378c865c7..b0ebfdd50ef3f422395a36d79f69d1512efac1df 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