style: fix all golangci-lint issues and format code (refs #17)

Fix 380 lint violations across all Go source files including wsl_v5,
nlreturn, noinlineerr, errcheck, funlen, funcorder, tagliatelle,
perfsprint, modernize, revive, gosec, ireturn, mnd, forcetypeassert,
cyclop, and others.

Key changes:
- Split large handler/command functions into smaller methods
- Extract scan helpers for database queries
- Reorder exported/unexported methods per funcorder
- Add sentinel errors in models package
- Use camelCase JSON tags per tagliatelle defaults
- Add package comments
- Fix .gitignore to not exclude cmd/chat-cli directory
This commit is contained in:
clawbot
2026-02-26 06:27:56 -08:00
parent 636546d74a
commit b78d526f02
13 changed files with 1920 additions and 753 deletions

View File

@@ -2,7 +2,6 @@ package models
import (
"context"
"fmt"
"time"
)
@@ -23,5 +22,5 @@ func (s *Session) User(ctx context.Context) (*User, error) {
return ul.GetUserByID(ctx, s.UserID)
}
return nil, fmt.Errorf("user lookup not available")
return nil, ErrUserLookupNotAvailable
}