fn print_namespaces(nslist: &NamespaceList, regex: Option<Regex>, writer: &mut ClickWriter) {
    let mut table = Table::new();
    table.set_titles(row!["Name", "Status", "Age"]);

    let ns_specs = nslist.items.iter().map(|ns| {
        let mut specs = Vec::new();
        specs.push(CellSpec::new(ns.metadata.name.as_str()));
        let ps = ns.status.phase.as_str();
        specs.push(CellSpec::with_style(ps, phase_style_str(ps)));
        specs.push(CellSpec::new_owned(format!(
            "{}",
            time_since(ns.metadata.creation_timestamp.unwrap())
        )));
        (ns, specs)
    });

    let filtered = match regex {
        Some(r) => ::table::filter(ns_specs, r),
        None => ns_specs.collect(),
    };

    ::table::print_table(&mut table, &filtered, writer);
}
/// Print out the specified list of deployments in a pretty format
Print out the specified list of deployments in a pretty format
Print out the specified list of deployments in a pretty format
fn print_namespaces(nslist: &NamespaceList, regex: Option<Regex>, writer: &mut ClickWriter) {
    let mut table = Table::new();
    table.set_titles(row!["Name", "Status", "Age"]);
    let ns_specs = nslist.items.iter().map(|ns| {
        let mut specs = Vec::new();
        specs.push(CellSpec::new(ns.metadata.name.as_str()));
        let ps = ns.status.phase.as_str();
        specs.push(CellSpec::with_style(ps, phase_style_str(ps)));
        specs.push(CellSpec::new_owned(format!(
            "{}",
            time_since(ns.metadata.creation_timestamp.unwrap())
        )));
        (ns, specs)
    });
    let filtered = match regex {
        Some(r) => ::table::filter(ns_specs, r),
        None => ns_specs.collect(),
    };
    ::table::print_table(&mut table, &filtered, writer);
}
fn print_namespaces ( nslist : & NamespaceList , regex : Option < Regex > , writer : & mut ClickWriter ) { let mut table = Table :: new ( ) ; table . set_titles ( row ! [ " " " " " " ] ) ; let ns_specs = nslist . items . iter ( ) . map ( | ns | { let mut specs = Vec :: new ( ) ; specs . push ( CellSpec :: new ( ns . metadata . name . as_str ( ) ) ) ; let ps = ns . status . phase . as_str ( ) ; specs . push ( CellSpec :: with_style ( ps , phase_style_str ( ps ) ) ) ; specs . push ( CellSpec :: new_owned ( format ! ( " " time_since ( ns metadata creation_timestamp unwrap ( ) ) ) ) ) ; ( ns , specs ) } ) ; let filtered = match regex { Some ( r ) => :: table :: filter ( ns_specs , r ) , None => ns_specs . collect ( ) , } ; :: table :: print_table ( & mut table , & filtered , writer ) ; }
Print out the specified list of deployments in a pretty format
Print out the specified list of deployments in a pretty format
nslist
&NamespaceList
regex
Option<Regex>
writer
&mut ClickWriter
nslist
&NamespaceList
regex
Option<Regex>
writer
&mut ClickWriter