We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be beneficial to be able to use environment variables in defaults via the "env!"-macro.
This would allow you to do something like this:
#[derive(Clone, Debug, Envconfig)] pub struct Config { #[envconfig( from = "CUSTOM_LOG_DIR", default = env!("DEFAULT_LOG_DIR") )] pub log_location: String, }
And get a compilation error "error: environment variable DEFAULT_LOG_DIR not defined" if it isn't accessible.
DEFAULT_LOG_DIR
The text was updated successfully, but these errors were encountered:
Is there any update on this?
Sorry, something went wrong.
@KaloyanYosifov
Hi no, not yet. But if multiple people demand it I will considering adding it.
No branches or pull requests
It would be beneficial to be able to use environment variables in defaults via the "env!"-macro.
This would allow you to do something like this:
And get a compilation error "error: environment variable
DEFAULT_LOG_DIR
not defined" if it isn't accessible.The text was updated successfully, but these errors were encountered: