Documentation
¶
Overview ¶
Package errconst provides a go/analysis analyzer enforcing the gomatic Go standard that errors are sentinel constants (errs.Const), never created with errors.New or fmt.Errorf — fmt.Errorf is permitted only to wrap a cause with %w.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "errconst", Doc: "reports errors.New and non-wrapping fmt.Errorf, which the gomatic Go standard forbids", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports disallowed error construction.
View Source
var Registration = goyze.Registration{ Name: "errconst", Categories: []goyze.Category{"errors"}, URL: "https://docs.gomatic.dev/yze/errconst", Analyzer: Analyzer, }
Registration declares this analyzer to the yze framework.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
yze-go-errconst
command
Command yze-go-errconst runs the errconst analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
|
Command yze-go-errconst runs the errconst analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`). |
Click to show internal directories.
Click to hide internal directories.