Improve string view of single QEntry instances

This commit is contained in:
Jan Philipp Timme 2018-12-30 13:15:14 +01:00
parent d087d8d746
commit 73fd1dcf8e
1 changed files with 5 additions and 1 deletions

View File

@ -28,7 +28,11 @@ func (m QEntry) ShortString() string {
} }
func (m QEntry) String() 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 { func (m QEntry) DetailedString() string {