-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I tell viper.Unmarshal
to take environment variables into account?
#212
Comments
yes, i need to use |
I was able to get it working without Give it a try, repeated |
That worked for me too! |
@postcert did't get it work here, can u give some sample code ? many thx |
I found that unmarshal env variable only work when the key is also in config file...not sure if this is bug |
Yes, it only works when already present in the config file. Still discovering these edge cases. |
Hi! Is it working? |
Please see and follow the issue above. ☝️ |
This is my viper config:
I also have a bunch of environment varibales, like
CLIENT_ID
orDATABASE_URL
. Right now I'm setting those via:Is it possible to tell
viper.Unmarshal
to use the environment variables in addition to the config file?The text was updated successfully, but these errors were encountered: