Prefer strings.Contains over strings.Count

Proprietary

Replace strings.Count(s, sub) > 0 with strings.Contains(s, sub) and strings.Count(s, sub) == 0 with !strings.Contains(s, sub).

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

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