Clean up presentation of items in command line client

This commit is contained in:
Peter Stuifzand 2018-06-27 21:38:52 +02:00
parent 545fd6ca03
commit 899588d73e

View File

@ -258,7 +258,10 @@ Commands:
} }
func showItem(item *microsub.Item) { func showItem(item *microsub.Item) {
fmt.Printf("%s - %s - %s\n", item.Name, item.Published, item.ID) if item.Name != "" {
fmt.Printf("%s - ", item.Name)
}
fmt.Printf("%s\n", item.Published)
if item.Content != nil { if item.Content != nil {
if item.Content.Text != "" { if item.Content.Text != "" {
fmt.Println(item.Content.Text) fmt.Println(item.Content.Text)