From 73fd1dcf8e8e7df7041fec88b0518fee17896c34 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 30 Dec 2018 13:15:14 +0100 Subject: [PATCH] Improve string view of single QEntry instances --- parser/parser.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parser/parser.go b/parser/parser.go index 1a37183..44f0666 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -28,7 +28,11 @@ func (m QEntry) ShortString() string { } func (m QEntry) String() string { - return fmt.Sprintf("[%s] %s <%s> -> %d recipients (%s, %d bytes)", m.date.Format(sortableDateFormat), m.id, m.sender, len(m.recipients), m.status, m.size) + var recipientSuffix string + if len(m.recipients) > 1 { + recipientSuffix = ",..." + } + return fmt.Sprintf("[%s] %s <%s> -> {%d}<%s>%s (%s, %d bytes)", m.date.Format(sortableDateFormat), m.id, m.sender, len(m.recipients), m.recipients[0], recipientSuffix, m.status, m.size) } func (m QEntry) DetailedString() string {