From 90d933551c8351fc75c78a2f8d8376ac09e9dfa6 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 16 Sep 2019 18:28:45 +0200 Subject: [PATCH] fix formatting directives (to pass go test) --- internal/buffer/out_message_test.go | 4 ++-- mount_test.go | 6 +++--- samples/mount_sample/mount.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/buffer/out_message_test.go b/internal/buffer/out_message_test.go index b6bae8b..c257ff5 100644 --- a/internal/buffer/out_message_test.go +++ b/internal/buffer/out_message_test.go @@ -280,12 +280,12 @@ func TestOutMessageGrow(t *testing.T) { // Check the resulting length in two ways. const wantLen = payloadSize + OutMessageHeaderSize if got, want := om.Len(), wantLen; got != want { - t.Errorf("om.Len() = %d, want %d", got) + t.Errorf("om.Len() = %d, want %d", got, want) } b := om.Bytes() if got, want := len(b), wantLen; got != want { - t.Fatalf("len(om.Len()) = %d, want %d", got) + t.Fatalf("len(om.Len()) = %d, want %d", got, want) } // Check that the payload was zeroed. diff --git a/mount_test.go b/mount_test.go index 0ceb8d7..5eeee42 100644 --- a/mount_test.go +++ b/mount_test.go @@ -40,7 +40,7 @@ func TestSuccessfulMount(t *testing.T) { // Set up a temporary directory. dir, err := ioutil.TempDir("", "mount_test") if err != nil { - t.Fatal("ioutil.TempDir: %v", err) + t.Fatalf("ioutil.TempDir: %v", err) } defer os.RemoveAll(dir) @@ -80,7 +80,7 @@ func TestNonEmptyMountPoint(t *testing.T) { // Set up a temporary directory. dir, err := ioutil.TempDir("", "mount_test") if err != nil { - t.Fatal("ioutil.TempDir: %v", err) + t.Fatalf("ioutil.TempDir: %v", err) } defer os.RemoveAll(dir) @@ -116,7 +116,7 @@ func TestNonexistentMountPoint(t *testing.T) { // Set up a temporary directory. dir, err := ioutil.TempDir("", "mount_test") if err != nil { - t.Fatal("ioutil.TempDir: %v", err) + t.Fatalf("ioutil.TempDir: %v", err) } defer os.RemoveAll(dir) diff --git a/samples/mount_sample/mount.go b/samples/mount_sample/mount.go index 6ab7290..d0efebe 100644 --- a/samples/mount_sample/mount.go +++ b/samples/mount_sample/mount.go @@ -123,7 +123,7 @@ func main() { // Grab the file to signal when ready. readyFile, err := getReadyFile() if err != nil { - log.Fatalf("getReadyFile:", err) + log.Fatalf("getReadyFile: %v", err) } // Create an appropriate file system.