menva

Crates.iomenva
lib.rsmenva
version1.0.0
sourcesrc
created_at2023-10-07 19:50:48.618331
updated_at2024-01-19 22:34:37.163266
descriptionManage environment variables
homepage
repositoryhttps://github.com/lucas-montes/menva
max_upload_size
id996557
size4,387
Lucas Montes (lucas-montes)

documentation

README

Menva

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!(), } } ´´´

Commit count: 1

cargo fmt