Skip to main content

gitee_cli_rs/cmd/
org.rs

1use super::Ctx;
2use crate::cli::OrgCmd;
3use crate::error::Result;
4use crate::out;
5
6pub fn execute(ctx: &Ctx, cmd: OrgCmd) -> Result<()> {
7    match cmd {
8        OrgCmd::List { limit } => {
9            let items = ctx.client.users().orgs(limit.limit)?;
10            let mut out = std::io::stdout().lock();
11            ctx.out
12                .render(&mut out, &items, |w| out::org_table(w, &items))?;
13        }
14    }
15    Ok(())
16}