moover_rust/src/util/security.rs
2024-01-22 19:54:16 +01:00

11 lines
No EOL
197 B
Rust

use dotenv::dotenv;
use std::env;
pub fn dotenv_var(key: &str) -> Option<String> {
dotenv().ok();
match env::var(key) {
Ok(val) => return Some(val),
Err(_) => None
}
}