You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if i understand this currently, you need to load a config file into your application but some of the variables need to be set by environment variables.
I had a similar experience and this little trick may be helpful:
Basically you can load your configs from a config.yaml file but you can also load some other variables from env after that and you can use the uber's "multierr" package to combine ReadConfig and ReadEnv errors together. Here's an example of the struct that i used:
Example:
where DB_HOST,DB_PORT,... are the environment variables
The text was updated successfully, but these errors were encountered: