From 7b1fa6c8338ca0ce88f3cfa0e9d187d6fc5d271b Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 1 Jan 2019 21:27:56 +0100 Subject: [PATCH] Add number of recipients to QEntry detailed string --- mailq/string.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailq/string.go b/mailq/string.go index d3963bd..7493535 100644 --- a/mailq/string.go +++ b/mailq/string.go @@ -27,7 +27,7 @@ func (m QEntry) DetailedString() string { if m.Reason == "" { reasonStr = "-/-" } - return fmt.Sprintf("Id: %s\nDate: %s\nStatus: %s\nReason: %s\nSize: %d\nSender: %s\nRecipients: %s", m.Id, m.Date.Format(SortableDateFormat), m.Status, reasonStr, m.Size, m.Sender, strings.Join(m.Recipients, ", ")) + return fmt.Sprintf("Id: %s\nDate: %s\nStatus: %s\nReason: %s\nSize: %d\nSender: %s\nRecipients: {%d} %s", m.Id, m.Date.Format(SortableDateFormat), m.Status, reasonStr, m.Size, m.Sender, len(m.Recipients), strings.Join(m.Recipients, ", ")) } func (queue MailQ) WriteMachineReadable(writer io.Writer) {