What problem does it solve?
It prevents configuration drift by ensuring that Go Config structs, doc.go documentation, and .env variables stay aligned when using envconfig and env.InitConfig.
Core Features & Use Cases
- Keeps Config contracts consistent: validates that envconfig tags match what you document and what you place in
.env.
- Guides correct configuration loading: standardizes loading via
env.InitConfig from .env (optional) and environment variables.
- Supports nested adapter/platform configs: documents top-level variables explicitly while pointing to nested configs to avoid documentation noise.
- Improves test reliability: clarifies how to handle defaults/parsing/required behavior and warns against
t.Setenv combined with t.Parallel() when process-wide state is involved.
Quick Start
Run scripts/check-env-config.py for your <config.go>, <doc.go>, and optionally your .env file to immediately verify the env variables are synchronized.