From 7c9f910607afbb5e33146d966e6c60ac5dbf3b31 Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Sun, 13 Nov 2016 13:10:42 -0800 Subject: [PATCH] all: fix vet nits Fixes these vet complaints: net/error_test.go:254: unrecognized printf flag for verb 'T': '#' os/os_test.go:1067: arg mt for printf verb %d of wrong type: time.Time runtime/debug/garbage_test.go:83: arg dt for printf verb %d of wrong type: time.Time Change-Id: I0e986712a4b083b75fb111e687e424d06a85a47b Reviewed-on: https://go-review.googlesource.com/33167 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/net/error_test.go | 2 +- src/os/os_test.go | 2 +- src/runtime/debug/garbage_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net/error_test.go b/src/net/error_test.go index a609aaa7ba..c23da49fad 100644 --- a/src/net/error_test.go +++ b/src/net/error_test.go @@ -251,7 +251,7 @@ func TestDialAddrError(t *testing.T) { operr := err.(*OpError).Err aerr, ok := operr.(*AddrError) if !ok { - t.Errorf("%s: %v is %#T, want *AddrError", op, err, operr) + t.Errorf("%s: %v is %T, want *AddrError", op, err, operr) continue } want := tt.lit diff --git a/src/os/os_test.go b/src/os/os_test.go index eb4454411f..b1e20b7839 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -1064,7 +1064,7 @@ func testChtimes(t *testing.T, name string) { } if !pmt.Before(mt) { - t.Errorf("ModTime didn't go backwards; was=%d, after=%d", mt, pmt) + t.Errorf("ModTime didn't go backwards; was=%v, after=%v", mt, pmt) } } diff --git a/src/runtime/debug/garbage_test.go b/src/runtime/debug/garbage_test.go index 6b03455cf9..04e954b1b1 100644 --- a/src/runtime/debug/garbage_test.go +++ b/src/runtime/debug/garbage_test.go @@ -80,7 +80,7 @@ func TestReadGCStats(t *testing.T) { for i := 0; i < n; i++ { dt := stats.PauseEnd[i] if dt.UnixNano() != int64(mstats.PauseEnd[off]) { - t.Errorf("stats.PauseEnd[%d] = %d, want %d", i, dt, mstats.PauseEnd[off]) + t.Errorf("stats.PauseEnd[%d] = %d, want %d", i, dt.UnixNano(), mstats.PauseEnd[off]) } off = (off + len(mstats.PauseEnd) - 1) % len(mstats.PauseEnd) }