← All recipes
Moderne licensed

Fix error string format

Recipe IDorg.openrewrite.golang.codequality.FixErrorStringFormatArtifactgithub.com/moderneinc/recipes-go

Lowercase the leading word of errors.New and fmt.Errorf messages and remove trailing punctuation, so the message reads correctly when a caller wraps it in a larger one (staticcheck ST1005).

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.FixErrorStringFormat

If the recipe isn’t available locally, install it with:

mod config recipes go install github.com/moderneinc/recipes-go