trueblocks-core
trueblocks-core copied to clipboard
Replace viper for reading configuration
We currently use a package called Viper to read the configuration (TOML file and environment variables). However, it has one (at least) irritating issue - it only reads environment variables if there's a default value registered for the configuration key. It would be hard and pointless to have such defaults defined for "dynamic" keys like API providers access keys and possible future settings.
It also works differently when there is and when there isn't a TOML file, which makes debugging configuration issues more problematic.
I suggest we move to koanf - I've been using it for Key and didn't see any issues. Of course the first part of this task would be to double check that the environmental variable problem doesn't occur with koanf.