Documentation
¶
Overview ¶
Package globalvar provides a go/analysis analyzer enforcing the gomatic immutability/DI standard: package-level mutable vars are forbidden. Prefer a constant or dependency injection. A small allow-listed set of sanctioned package vars (and any configured via the -allow flag) is permitted.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = newAnalyzer()
Analyzer reports package-level mutable vars that are not allow-listed.
View Source
var Registration = goyze.Registration{ Name: "globalvar", Categories: []goyze.Category{"immutability"}, URL: "https://docs.gomatic.dev/yze/globalvar", 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-globalvar
command
Command yze-go-globalvar runs the globalvar analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
|
Command yze-go-globalvar runs the globalvar 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.