diff --git a/parser/parser.go b/parser/parser.go index 44f0666..901813b 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -36,7 +36,11 @@ func (m QEntry) String() string { } func (m QEntry) DetailedString() string { - 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, m.reason, m.size, m.sender, strings.Join(m.recipients, ", ")) + var reasonStr 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, ", ")) } func ParseMailQ(dataSource io.Reader) ([]QEntry, error) {