makeormake bin/auth0-cas-server-go- Build binarymake all- Build binary and Docker containermake lint- Run mega-linter with Go linting rulesmake docker-build- Build Docker containergo run .- Run directly with Go
- License Header: All files must start with Linux Foundation MIT license header
- Package: Single
mainpackage for this service - Imports: Standard library first, then third-party, separated by blank lines
- Naming: Use camelCase for private, PascalCase for public; descriptive variable names
- Error Handling: Use slog for logging with structured fields; fatal errors use
slog.Errorwithos.Exit(1) - Comments: Spell-checker disable/enable blocks around imports; function comments for public APIs
- Global Variables: Minimal use (cfg for config, store for sessions)
- Context: Pass context through request handlers for logging and tracing
- Types: Define custom types for constants (e.g.,
contextID int) - Environment: Use godotenv for optional .env file loading in init()
- Linting: Uses mega-linter with revive (not golangci-lint), excludes spell/link checkers
- Global config in
cfgvariable populated via init() - Request-scoped logging with context injection
- OpenTelemetry instrumentation throughout
- Gorilla sessions for cookie management