Documentation
¶
Overview ¶
Package ctxfirst provides a go/analysis analyzer enforcing the gomatic Go idiom that a context.Context parameter is always the first parameter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "ctxfirst", Doc: "reports context.Context parameters that are not the first parameter", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports context.Context parameters that are not first.
View Source
var Registration = goyze.Registration{ Name: "ctxfirst", Categories: []goyze.Category{"patterns"}, URL: "https://docs.gomatic.dev/yze/ctxfirst", 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-ctxfirst
command
Command yze-go-ctxfirst runs the ctxfirst analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).
|
Command yze-go-ctxfirst runs the ctxfirst analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`). |
Click to show internal directories.
Click to hide internal directories.