// the find
jinzhu/configor
Golang Configuration tool that support YAML, JSON, TOML, Shell Environment
Configor is a Go configuration loader that merges YAML, JSON, TOML, and environment variables into a typed struct. It handles environment-specific overrides (config.production.json layered on top of config.json) and supports struct tags for defaults, required fields, and env var names. It's from jinzhu, the GORM author, and follows a similar philosophy: minimal API, struct tags do the work.
Environment-layered config files (base + environment-specific overlay) is genuinely useful and requires zero boilerplate. The struct tag system for defaults, required validation, and env var naming means your config struct is self-documenting. Anonymous struct embedding with the anonymous tag gives you reusable config blocks without polluting env var names. Auto-reload with a callback is a nice touch for long-running services that need to pick up changes without a restart.
The auto-reload implementation is time-based polling, not inotify/fsnotify — it will miss changes between polls and can't be tuned below one second. No support for remote config sources (Consul, etcd, Vault) which most non-trivial production setups need. The project is essentially unmaintained — the last meaningful commit was years before the 2024 touch, and open issues sit unanswered. Viper covers the same ground with a much larger ecosystem and active maintenance, so choosing configor today means betting on a library that has effectively stopped moving.