From 6c7a1d1ea2bf582ac9e6db58a74ee41ed6db2671 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sun, 30 Jul 2023 18:44:24 +1200 Subject: [PATCH] Format error syntax --- sendmail/cmd/cmd.go | 2 +- storage/database_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sendmail/cmd/cmd.go b/sendmail/cmd/cmd.go index 2672a29..2c8f723 100644 --- a/sendmail/cmd/cmd.go +++ b/sendmail/cmd/cmd.go @@ -125,7 +125,7 @@ func Run() { msg, err := mail.ReadMessage(bytes.NewReader(body)) if err != nil { - fmt.Fprintln(os.Stderr, fmt.Sprintf("error parsing message body: %s", err)) + fmt.Fprintf(os.Stderr, "error parsing message body: %si\n", err) os.Exit(11) } diff --git a/storage/database_test.go b/storage/database_test.go index e9876ee..0612f1b 100644 --- a/storage/database_test.go +++ b/storage/database_test.go @@ -263,10 +263,10 @@ func assertEqual(t *testing.T, a interface{}, b interface{}, message string) { func assertEqualStats(t *testing.T, total int, unread int) { s := StatsGet() if total != s.Total { - t.Fatal(fmt.Sprintf("Incorrect total mailbox stats: \"%d\" != \"%d\"", total, s.Total)) + t.Fatalf("Incorrect total mailbox stats: \"%d\" != \"%d\"", total, s.Total) } if unread != s.Unread { - t.Fatal(fmt.Sprintf("Incorrect unread mailbox stats: \"%d\" != \"%d\"", unread, s.Unread)) + t.Fatalf("Incorrect unread mailbox stats: \"%d\" != \"%d\"", unread, s.Unread) } }