Documentation
Config
Load, validate, and freeze service configuration.
Overview
Configuration should be validated at startup and surfaced in logs safely.
Example
Go
cfg, err := config.Load()
if err != nil {
log.Fatal(err)
}Best Practices
- Validate required env vars on boot.
- Keep secrets out of logs.
Common Pitfalls
- Mutating config values at runtime.
- Allowing silent fallback for critical settings.