codeberg_cli/actions/config/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pub mod generate;
pub mod info;

use clap::Subcommand;

use super::GeneralArgs;

/// Config subcommands
#[derive(Subcommand, Debug)]
pub enum ConfigArgs {
    Info(info::ConfigInfoArgs),
    Generate(generate::ConfigGenerateArgs),
}

impl ConfigArgs {
    pub async fn run(self, general_args: GeneralArgs) -> anyhow::Result<()> {
        match self {
            ConfigArgs::Info(args) => args.run(general_args),
            ConfigArgs::Generate(args) => args.run(general_args),
        }
    }
}