Replace extra %w verbs with %v in fmt.Errorf
Recipe ID
org.openrewrite.golang.codequality.AuditMultipleErrorWrapsArtifactgithub.com/moderneinc/recipes-goReplace all but the first %w with %v in fmt.Errorf format strings. Multiple error wrapping is invalid in Go < 1.20 and rare in later versions.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.golang.codequality.AuditMultipleErrorWrapsIf the recipe isn’t available locally, install it with:
mod config recipes go install github.com/moderneinc/recipes-go