Closed jbergstroem closed 1 month ago
agreed, mb viper would not be a bad choice for initializing the config. I have a rather complex config structure so I didn’t use environment variables yet.
agreed, mb viper would not be a bad choice for initializing the config. I have a rather complex config structure so I didn’t use environment variables yet.
It could be useful to have config mounted for all your environments, but override things like dsn/password/host between them.
I would like this as well! For our Kubernetes setup it makes sense to override secrets (like Postgres password) using environement variables.
sorry for the dellay, working on it
It would be great to be able to override/set config values through environment variables. I believe viper supports this out of the box; combining
viper.SetEnvPrefix()
andviper.AutomaticEnv()
could be a good start?