← All recipes
Moderne licensed

Use short receiver name

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

Rename method receivers longer than 2 characters to the first lowercase letter of the type name, unless that name is already bound in the method.

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

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

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