Prefer strings.ContainsAny

Proprietary

Replace strings.IndexAny(s, chars) != -1 with strings.ContainsAny(s, chars) and strings.IndexAny(s, chars) == -1 with !strings.ContainsAny(s, chars).

org.openrewrite.golang.codequality.PreferStringsContainsAny
mod run . --recipe=org.openrewrite.golang.codequality.PreferStringsContainsAny

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.