acc 0.3.2

plaintext double-entry accounting command line tool
Documentation
1
2
3
4
5
6
7
8
use crate::error::Error;

/// Read an API key from an environment variable.
pub fn load_api_key(name: &str) -> Result<String, Error> {
    std::env::var(name).map_err(|_| {
        Error::new(format!("environment variable '{}' is not set", name))
    })
}