-
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
[Feature Request] Automatically load config values for specific keys from files #1022
Comments
👋 Thanks for reporting! A maintainer will take a look at your issue shortly. 👀 In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues. ⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9 📣 If you've already given us your feedback, you can still help by spreading the news, https://twitter.com/sagikazarmark/status/1306904078967074816 Thank you! ❤️ |
Looks like there's even a pr from 2015 about this: #94 |
V2 will change a lot of aspects of config loading, so this might be easier to implement, but I don't think it's high on the priority list. You'll probably be able to implement it for yourself if/when #1046 lands, but I'm not sure this is something we want to maintain in the core. |
@sagikazarmark I see, thanks for the explanation. |
It would be great if viper had the ability to automatically load config values for specific keys from files, by adding a
_FILE
suffix to the env variable or config variable name.For example, if I have a config variable which I can configure with the
EXAMPLE
env variable I would like to populate that config value from the file at/path/to/file
if I set the variableEXAMPLE_FILE=/path/to/file
. This would enable support for docker secrets out of the box.Maybe a feature for v2?
The text was updated successfully, but these errors were encountered: