Use when defining or implementing Go interfaces, designing abstractions, creating mockable boundaries for testing, or composing types through embedding. Also…
Go Interfaces and Composition
Available Scripts
scripts/check-interface-compliance.sh — Finds exported interfaces missing compile-time compliance checks (var _ I = (*T)(nil)). Run bash scripts/check-interface-compliance.sh --help for options.
Accept Interfaces, Return Concrete Types
Interfaces belong in the package that consumes values, not the package that
implements them. Return concrete (usually pointer or struct) types from
constructors so new methods can be added without refactoring.
// Good: consumer defines the interface it needs
package consumer
type Thinger interface { Thing() bool }don't have the plugin yet? install it then click "run inline in claude" again.