foxtive 0.25.6

Foxtive Framework
Documentation
1
2
3
4
5
6
7
8
use crate::prelude::AppMessage;
use crate::results::AppResult;
use std::env;

pub fn var(env_prefix: &str, key: &str) -> AppResult<String> {
    let key = format!("{env_prefix}_{key}");
    env::var(&key).map_err(|e| AppMessage::MissingEnvironmentVariable(key, e).into_anyhow())
}