Hacker News new | ask | show | jobs
by knadh 1483 days ago
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