Use strings.ReplaceAll

Proprietary

Replace strings.Replace(s, old, new, -1) with strings.ReplaceAll(s, old, new).

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

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