Crates.io | menva |
lib.rs | menva |
version | 1.0.0 |
source | src |
created_at | 2023-10-07 19:50:48.618331 |
updated_at | 2024-01-19 22:34:37.163266 |
description | Manage environment variables |
homepage | |
repository | https://github.com/lucas-montes/menva |
max_upload_size | |
id | 996557 |
size | 4,387 |
Set your environment variables from your .env file ´´´rust use menva::read_env_file;
fn main() { read_env_file(".env"); do_cool_things(); } ´´´
Get your environment variables with their type ´´´rust use menva::{get_env, get_bool_env};
pub fn do_cool_things() { match get_bool_env("SHOULD_I") { true => println!("{}", get_env("SECRET_TEXT")), false => todo!(), } } ´´´