Prefer strings.NewReader

Proprietary

Replace bytes.NewReader([]byte(s)) with strings.NewReader(s) to avoid an unnecessary string-to-byte-slice conversion.

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

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