git » dnss » commit 8390577

test: Fix formatting in a testing.T.Logf call

author Alberto Bertogli
2017-11-08 22:45:56 UTC
committer Alberto Bertogli
2017-11-08 22:45:56 UTC
parent befaea21c4632c7c4fd9988065ccde39d271573e

test: Fix formatting in a testing.T.Logf call

In a testing.T.Logf call, we were using %b instead of %t for a boolean
value. This is incorrect, and was caught by the upcoming compiler
version.

The patch fixes the call by using %t instead.

internal/testutil/testutil.go +1 -1

diff --git a/internal/testutil/testutil.go b/internal/testutil/testutil.go
index 92033e4..fe2dc52 100644
--- a/internal/testutil/testutil.go
+++ b/internal/testutil/testutil.go
@@ -96,7 +96,7 @@ func NewTestTrace(t *testing.T) *TestTrace {
 }
 
 func (t *TestTrace) LazyLog(x fmt.Stringer, sensitive bool) {
-	t.T.Logf("trace %p (%b): %s", t, sensitive, x)
+	t.T.Logf("trace %p (%t): %s", t, sensitive, x)
 }
 
 func (t *TestTrace) LazyPrintf(format string, a ...interface{}) {