add subcomands for the current days
This commit is contained in:
parent
d50a745a46
commit
27e7e0416a
1 changed files with 40 additions and 0 deletions
|
@ -3,6 +3,11 @@ use clap::{arg, Parser, Subcommand};
|
||||||
use commands::day001::*;
|
use commands::day001::*;
|
||||||
use commands::day002::*;
|
use commands::day002::*;
|
||||||
use commands::day003::*;
|
use commands::day003::*;
|
||||||
|
use commands::day004::*;
|
||||||
|
use commands::day005::*;
|
||||||
|
use commands::day006::*;
|
||||||
|
use commands::day007::*;
|
||||||
|
use commands::day008::*;
|
||||||
//use std::ffi::OsString;
|
//use std::ffi::OsString;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
@ -44,6 +49,36 @@ pub enum Commands {
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
alt: bool,
|
alt: bool,
|
||||||
},
|
},
|
||||||
|
/// Solution for day 04
|
||||||
|
Day004 {
|
||||||
|
file: Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
|
alt: bool,
|
||||||
|
},
|
||||||
|
/// Solution for day 05
|
||||||
|
Day005 {
|
||||||
|
file: Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
|
alt: bool,
|
||||||
|
},
|
||||||
|
/// Solution for day 06
|
||||||
|
Day006 {
|
||||||
|
file: Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
|
alt: bool,
|
||||||
|
},
|
||||||
|
/// Solution for day 07
|
||||||
|
Day007 {
|
||||||
|
file: Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
|
alt: bool,
|
||||||
|
},
|
||||||
|
/// Solution for day 08
|
||||||
|
Day008 {
|
||||||
|
file: Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
|
alt: bool,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn execute_cli() {
|
pub fn execute_cli() {
|
||||||
|
@ -57,5 +92,10 @@ pub fn execute_cli() {
|
||||||
_ => panic!(),
|
_ => panic!(),
|
||||||
},
|
},
|
||||||
Commands::Day003 { file, alt } => subcmd_day003(&file, &alt),
|
Commands::Day003 { file, alt } => subcmd_day003(&file, &alt),
|
||||||
|
Commands::Day004 { file, alt } => subcmd_day004(&file, &alt),
|
||||||
|
Commands::Day005 { file, alt } => subcmd_day005(&file, &alt),
|
||||||
|
Commands::Day006 { file, alt } => subcmd_day006(&file, &alt),
|
||||||
|
Commands::Day007 { file, alt } => subcmd_day007(&file, &alt),
|
||||||
|
Commands::Day008 { file, alt } => subcmd_day008(&file, &alt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue