go.tools/cmd/vet: fix error message

R=r, dsymonds, bradfitz
CC=golang-dev
https://golang.org/cl/11552043
This commit is contained in:
Robert Griesemer 2013-07-18 16:56:01 -07:00
parent 69ce87a6c1
commit 9460d02473
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,8 @@ func (f *File) checkPrintf(call *ast.CallExpr, name string, formatIndex int) {
return return
} }
if lit.Kind() != exact.String { 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) format := exact.StringVal(lit)
firstArg := formatIndex + 1 // Arguments are immediately after format string. firstArg := formatIndex + 1 // Arguments are immediately after format string.