← All recipes
Moderne licensed

Check template execute error

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

Wrap bare calls to Execute and ExecuteTemplate on templates in an if-init error check so the returned error is not silently ignored.

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

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

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