Documentation
¶
Overview ¶
Package stdlog provides a go/analysis analyzer enforcing the gomatic Go logging standard: the standard library "log" package is forbidden in favor of structured logging with "log/slog".
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{
Name: "stdlog",
Doc: "reports imports of the standard log package, which the gomatic standard replaces with log/slog",
Run: run,
}
Analyzer reports imports of the standard "log" package.
View Source
var Registration = goyze.Registration{ Name: "stdlog", Categories: []goyze.Category{"logging"}, URL: "https://docs.gomatic.dev/yze/stdlog", Analyzer: Analyzer, }
Registration declares this analyzer to the yze framework. The category is "logging", shared with yze/slogkv, so narrowing a run to the logging standard yields the whole standard rather than half of it; "data" was this rule's tag until then and named the wrong subject — it is jsontag's, about serialization.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.