From 9460d02473f31c7b58da8f42bf9d4e44a472733b Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 18 Jul 2013 16:56:01 -0700 Subject: [PATCH] go.tools/cmd/vet: fix error message R=r, dsymonds, bradfitz CC=golang-dev https://golang.org/cl/11552043 --- cmd/vet/print.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/vet/print.go b/cmd/vet/print.go index b09a5fcb..87cbce33 100644 --- a/cmd/vet/print.go +++ b/cmd/vet/print.go @@ -93,7 +93,8 @@ func (f *File) checkPrintf(call *ast.CallExpr, name string, formatIndex int) { return } if lit.Kind() != exact.String { - f.Badf(call.Pos(), "constant %v not a string in call to", lit, name) + f.Badf(call.Pos(), "constant %v not a string in call to %s", lit, name) + return } format := exact.StringVal(lit) firstArg := formatIndex + 1 // Arguments are immediately after format string.