Reuse JSON codec in loop

Proprietary

Find json.Marshal() or json.Unmarshal() calls inside for/range loops. Consider using a pre-allocated encoder/decoder for better performance.

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

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