gitee-cli-rs 0.2.2

A gh-like command-line client for Gitee
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::Ctx;
use crate::cli::OrgCmd;
use crate::error::Result;
use crate::out;

pub fn execute(ctx: &Ctx, cmd: OrgCmd) -> Result<()> {
    match cmd {
        OrgCmd::List { limit } => {
            let items = ctx.client.users().orgs(limit.limit)?;
            let mut out = std::io::stdout().lock();
            ctx.out
                .render(&mut out, &items, |w| out::org_table(w, &items))?;
        }
    }
    Ok(())
}