return
}
if lit.Kind == token.STRING {
- if strings.Index(lit.Value, "%") < 0 {
+ if strings.Contains(lit.Value, "%") {
if len(call.Args) > skip+1 {
f.Badf(call.Pos(), "no formatting directive in %s call", name)
}
}
arg := args[skip]
if lit, ok := arg.(*ast.BasicLit); ok && lit.Kind == token.STRING {
- if strings.Index(lit.Value, "%") >= 0 {
+ if strings.Contains(lit.Value, "%") {
f.Badf(call.Pos(), "possible formatting directive in %s call", name)
}
}
// escape escapes string s by bracketing it with tabwriter.Escape.
-// Escapes strings pass through tabwriter unchanged. (Note that
+// Escaped strings pass through tabwriter unchanged. (Note that
// valid Go programs cannot contain tabwriter.Escape bytes since
// they do not appear in legal UTF-8 sequences).
//