Fix all lint issues and update AGENTS.md workflow rules

- Fix stuttering type names (e.g. config.ConfigParams → config.Params)
- Add doc comments to all exported types/functions/methods
- Add package doc comments to all packages
- Fix JSON tags to camelCase
- Extract magic numbers to constants
- Add blank lines per nlreturn/wsl_v5 rules
- Use errors.Is() for error comparison
- Unexport NewLoggingResponseWriter (not used externally)
- Replace for-range on ctx.Done() with channel receive
- Rename unused parameters to _
- AGENTS.md: all changes via feature branches, no direct main commits
This commit is contained in:
clawbot
2026-02-09 12:33:08 -08:00
parent 7b0ff178d4
commit 6a108749a1
7 changed files with 42 additions and 47 deletions

View File

@@ -9,8 +9,8 @@ import (
"go.uber.org/fx"
)
// LoggerParams defines the dependencies for creating a Logger.
type LoggerParams struct {
// Params defines the dependencies for creating a Logger.
type Params struct {
fx.In
Globals *globals.Globals
@@ -20,11 +20,11 @@ type LoggerParams struct {
type Logger struct {
log *slog.Logger
level *slog.LevelVar
params LoggerParams
params Params
}
// New creates a new Logger with appropriate handler based on terminal detection.
func New(_ fx.Lifecycle, params LoggerParams) (*Logger, error) {
func New(_ fx.Lifecycle, params Params) (*Logger, error) {
l := new(Logger)
l.level = new(slog.LevelVar)
l.level.Set(slog.LevelInfo)