stdlog

package module
v0.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 3 Imported by: 0

README

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL