-
Use viper with care. It has some dangerous fundamental flaws [1]. We got bitten hard, submitted a PR [2] and followed up for a year and a half to no avail, before I went ahead and reinvented the wheel and wrote koanf (plug), specifically to avoid viper's flaws.
Most importantly:
- Breaks JSON, YAML, TOML etc. language specs by forcibly lowercasing all keys internally. Dangerous because it can silently merge differently cased config keys into lowercase.
- Hard codes big unnecessary dependencies into the core, significantly bloating build sizes. No separation or abstraction.
[1] https://github.com/spf13/viper/pull/635
[2] https://github.com/knadh/koanf#alternative-to-viper
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
koanf
Simple, extremely lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
Use viper with care. It has some dangerous fundamental flaws [1]. We got bitten hard, submitted a PR [2] and followed up for a year and a half to no avail, before I went ahead and reinvented the wheel and wrote koanf (plug), specifically to avoid viper's flaws.
Most importantly:
- Breaks JSON, YAML, TOML etc. language specs by forcibly lowercasing all keys internally. Dangerous because it can silently merge differently cased config keys into lowercase.
- Hard codes big unnecessary dependencies into the core, significantly bloating build sizes. No separation or abstraction.
[1] https://github.com/spf13/viper/pull/635
[2] https://github.com/knadh/koanf#alternative-to-viper