Prefer bytes.ContainsAny

Proprietary

Replace bytes.IndexAny(b, chars) != -1 with bytes.ContainsAny(b, chars) and bytes.IndexAny(b, chars) == -1 with !bytes.ContainsAny(b, chars).

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

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