From fb0a3cc640009e2b46b52eee514c854120d1e746 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 07:38:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(cli):=20implement=20commands?= =?UTF-8?q?=20dispatching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add logic to dispatch commands to their respective handlers - implement `run` method to handle different commands --- src/config_cli.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/config_cli.rs b/src/config_cli.rs index e2511b0..12d4640 100644 --- a/src/config_cli.rs +++ b/src/config_cli.rs @@ -22,11 +22,14 @@ pub struct ConfigCli { #[clap(flatten)] logging: clap_verbosity_flag::Verbosity, #[command(subcommand)] - command: Option, + command: Commands, } impl ConfigCli { - pub fn run(&self, _config: Config) -> Result<()> { - Ok(()) + pub fn run(&self, config: Config) -> Result<()> { + match &self.command { + Commands::Rules(rules_cli) => rules_cli.run(config), + Commands::Label(label_cli) => label_cli.run(config), + } } }