loadenv 0.1.4

A small, zero-dependency dotenv implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::env;

// clear existing environment variables
pub fn setup() {
    for (k, _) in env::vars() {
        env::remove_var(k);
    }
}

// convenience function to read an environment var
pub fn var<'a>(v: &'static str) -> String {
    env::var(v).unwrap()
}