allan2 / dotenvy

A well-maintained fork of the Rust dotenv crate
MIT License
625 stars 39 forks source link

dotenvy_macro could use a option_env!() macro #85

Open wfraser opened 8 months ago

wfraser commented 8 months ago

like the one in std: https://doc.rust-lang.org/std/macro.option_env.html

If the var isn't there, it returns None, instead of raising a compile error. There doesn't seem to be a way to do this with dotenvy currently.

allan2 commented 8 months ago

Good idea! PRs are welcome.