Commit 518c0adb authored by Rob Pike's avatar Rob Pike

govet: fix bug introduced at 4313054

R=rsc, gri
CC=golang-dev
https://golang.org/cl/4336042
parent f61b7e5d
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment