Fix missing symbol in tabwriter view

This commit is contained in:
Jan Philipp Timme 2018-12-31 17:20:48 +01:00
parent 78f9468f0c
commit 5a21e5a3cf
1 changed files with 1 additions and 2 deletions

View File

@ -24,7 +24,6 @@ func main() {
if settings["interactive"] == "true" {
interactiveShell()
}
fmt.Printf("I am done.\n")
}
func parseArguments() {
@ -69,7 +68,7 @@ func printQueueEntries(queue parser.MailQ, writer io.Writer) {
tabWriter := tabwriter.NewWriter(writer, 2, 2, 1, ' ', tabwriter.TabIndent)
fmt.Fprintf(tabWriter, "| %s\t| %s\t| %s\t| %s\t| %s\t| %s\t| %s\t| %s\t| \n", "Date", "Id", "Status", "Size", "Sender", "#", "First Recipient", "Reason")
for _, entry := range queue.Entries {
_, writeError := fmt.Fprintf(tabWriter, "| %s\t| %s\t| %s\t| %d\t| %s\t| {%d}\t| %s\t| %s\t \n", entry.Date.Format(parser.SortableDateFormat), entry.Id, entry.Status, entry.Size, entry.Sender, len(entry.Recipients), entry.Recipients[0], entry.Reason)
_, writeError := fmt.Fprintf(tabWriter, "| %s\t| %s\t| %s\t| %d\t| %s\t| {%d}\t| %s\t| %s\t| \n", entry.Date.Format(parser.SortableDateFormat), entry.Id, entry.Status, entry.Size, entry.Sender, len(entry.Recipients), entry.Recipients[0], entry.Reason)
if writeError != nil {
// A writeError is expected once the reader was closed
// This happens when the pager application got terminated