This is exactly what the most widely used golang configuration library does: https://github.com/spf13/viper
https://pypi.org/project/tconf/
This is exactly what the most widely used golang configuration library does: https://github.com/spf13/viper