2022-12-02 18:06:32 -06:00
|
|
|
use std::env;
|
|
|
|
|
2022-12-02 14:19:49 -06:00
|
|
|
mod day1;
|
2022-12-02 18:06:32 -06:00
|
|
|
mod day2;
|
2022-12-09 01:47:37 -06:00
|
|
|
mod day3;
|
2022-12-11 17:05:00 -06:00
|
|
|
mod day4;
|
2022-12-11 21:39:51 -06:00
|
|
|
mod day5;
|
2022-12-12 22:08:57 -06:00
|
|
|
mod day6;
|
2022-12-02 14:19:49 -06:00
|
|
|
|
|
|
|
fn main() {
|
2022-12-02 18:06:32 -06:00
|
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
match args.len() {
|
|
|
|
2 => {
|
|
|
|
let day_to_run = &args[1];
|
|
|
|
match &day_to_run[..] {
|
|
|
|
"day1" => day1::run(),
|
|
|
|
"day2" => day2::run(),
|
2022-12-09 01:47:37 -06:00
|
|
|
"day3" => day3::run(),
|
2022-12-11 17:05:00 -06:00
|
|
|
"day4" => day4::run(),
|
2022-12-11 21:39:51 -06:00
|
|
|
"day5" => day5::run(),
|
2022-12-12 22:08:57 -06:00
|
|
|
"day6" => day6::run(),
|
2022-12-02 18:06:32 -06:00
|
|
|
_ => eprintln!("error: invalid day")
|
|
|
|
}
|
|
|
|
},
|
|
|
|
_ => eprintln!("Error: not enough or too many arguments.")
|
|
|
|
};
|
2022-12-02 14:19:49 -06:00
|
|
|
}
|