pub async fn current_context() -> Result<String> {
    let (mut res, _) = kout(vec!["config".into(), "current-context".into()])
        .await
        .map_err(|e| {
            error!("Failed to Get kubectl config current-context. Is kubectl installed?");
            e
        })?;
    let len = res.len();
    if res.ends_with('\n') {
        res.truncate(len - 1);
    }
    Ok(res)
}
/// CLI way to resolve kube context
///
/// Should only be used from main.
CLI way to resolve kube context
Should only be used from main.
CLI way to resolve kube context Should only be used from main .
pub async fn current_context() -> Result<String> {
    let (mut res, _) = kout(vec!["config".into(), "current-context".into()])
        .await
        .map_err(|e| {
            error!("Failed to Get kubectl config current-context. Is kubectl installed?");
            e
        })?;
    let len = res.len();
    if res.ends_with('\n') {
        res.truncate(len - 1);
    }
    Ok(res)
}
pub async fn current_context ( ) -> Result < String > { let ( mut res , _ ) = kout ( vec ! [ " " into ( ) " " into ( ) ] ) . await . map_err ( | e | { error ! ( " " ) ; e } ) ? ; let len = res . len ( ) ; if res . ends_with ( '\n' ) { res . truncate ( len - 1 ) ; } Ok ( res ) }
CLI way to resolve kube context
Should only be used from main.
CLI way to resolve kube context Should only be used from main .