golang-viper
Installation
SKILL.md
Golang Viper Configuration
Viper is Go's most popular configuration library. It handles config files, environment variables, defaults, and remote config stores with a unified API.
Config Precedence (highest to lowest)
viper.Set()- explicit runtime overrides- Command-line flags (via pflag)
- Environment variables
- Config files
- Remote key/value stores (etcd, Consul)
viper.SetDefault()- defaults