Documentation ¶
Overview ¶
Package gorules contains ruleguard linter rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PreferXerrors ¶ added in v0.50.0
PreferXerrors suggests replace expressions like
errors.As
to
xerrors.As
func UberStyleErrors ¶ added in v0.50.0
UberStyleErrors detects error messages like
xerrors.Errorf("failed to do something: %w", err)
but you should avoid "failed to" and use
xerrors.Errorf("do something: %w", err)
according to https://github.com/uber-go/guide/blob/master/style.md#error-wrapping.
func UnnecessaryErrorFormat ¶ added in v0.50.0
UnnecessaryErrorFormat detects unnecessary error formatting like
xerrors.Errorf("error")
and suggests instead
xerrors.New("error")
func ZapPreferNoWith ¶
ZapPreferNoWith suggests replace expressions like
l.With(...).Debug("")
to
l.Debug("", ...).
where l is a *zap.Logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.