Skip to main content

resolve_token_with

Function resolve_token_with 

Source
pub fn resolve_token_with(
    flag: Option<&str>,
    env_value: Option<String>,
) -> Result<String, AppError>
Expand description

Pure core of resolve_token (env value injected for testability).

ยงErrors

Returns AppError::validation when neither flag nor env supplies a non-empty token.