Prefer %w over %s in fmt.Errorf for error wrapping

Proprietary

Replace %s with %w in fmt.Errorf format strings when the corresponding argument is an error, to preserve the error chain.

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

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