♻️ refactor(cli): rename config_cli to rules_cli
- rename config_cli to rules_cli for better clarity - rename ConfigCommands to RulesCommands for better clarity - rename ConfigCli to RulesCli for better clarity
This commit is contained in:
committed by
Jeremiah Russell
parent
39da683fc0
commit
33027a6c34
@@ -1,25 +1,26 @@
|
|||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
|
use cull_gmail::Config;
|
||||||
|
|
||||||
#[derive(Debug, Parser)]
|
#[derive(Debug, Parser)]
|
||||||
pub struct ConfigCli {
|
pub struct RulesCli {
|
||||||
/// Configuration commands
|
/// Configuration commands
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
command: ConfigCommands,
|
command: RulesCommands,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConfigCli {
|
impl RulesCli {
|
||||||
pub fn run(&self) {
|
pub fn run(&self, config: Config) {
|
||||||
match self.command {
|
match self.command {
|
||||||
ConfigCommands::List => todo!(),
|
RulesCommands::List => config.list_rules(),
|
||||||
ConfigCommands::Add => todo!(),
|
RulesCommands::Add => todo!(),
|
||||||
ConfigCommands::Remove => todo!(),
|
RulesCommands::Remove => todo!(),
|
||||||
ConfigCommands::Update => todo!(),
|
RulesCommands::Update => todo!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Subcommand)]
|
#[derive(Debug, Subcommand)]
|
||||||
pub enum ConfigCommands {
|
pub enum RulesCommands {
|
||||||
/// List the rules configured and saved in the config file
|
/// List the rules configured and saved in the config file
|
||||||
#[clap(name = "list")]
|
#[clap(name = "list")]
|
||||||
List,
|
List,
|
||||||
Reference in New Issue
Block a user