Documentation
¶
Overview ¶
Package gotostmt provides a go/analysis analyzer that forbids the goto statement, per the gomatic Go standard that control flow uses early returns and extracted helpers rather than goto.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "gotostmt", Doc: "reports use of the goto statement, which the gomatic Go standard forbids", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports every use of the goto statement.
View Source
var Registration = goyze.Registration{ Name: "gotostmt", Categories: []goyze.Category{"patterns"}, URL: "https://docs.gomatic.dev/yze/gotostmt", 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-gotostmt
command
Command yze-go-gotostmt runs the gotostmt analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
|
Command yze-go-gotostmt runs the gotostmt 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.