1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:20:22 -07:00

govet: fix bug introduced at 4313054

R=rsc, gri
CC=golang-dev
https://golang.org/cl/4336042
This commit is contained in:
Rob Pike 2011-03-29 13:18:52 -07:00
parent f61b7e5dc5
commit 518c0adb17

View File

@ -256,7 +256,7 @@ func (f *File) checkPrintf(call *ast.CallExpr, name string, skip int) {
return
}
if lit.Kind == token.STRING {
if strings.Contains(lit.Value, "%") {
if !strings.Contains(lit.Value, "%") {
if len(call.Args) > skip+1 {
f.Badf(call.Pos(), "no formatting directive in %s call", name)
}