Documentation
¶
Overview ¶
Package nopanic provides a go/analysis analyzer that forbids calls to the built-in panic outside test files, per the gomatic Go standard that errors are returned rather than raised by panicking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "nopanic", Doc: "reports calls to the built-in panic outside test files, which the gomatic Go standard forbids in favor of returning errors", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports calls to the built-in panic in non-test files.
View Source
var Registration = goyze.Registration{ Name: "nopanic", Categories: []goyze.Category{"patterns"}, URL: "https://docs.gomatic.dev/yze/nopanic", 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-nopanic
command
Command yze-go-nopanic runs the nopanic analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
|
Command yze-go-nopanic runs the nopanic 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.