use clap::{App, ArgMatches, SubCommand}; use domasi::pomodoro::Config; use domasi::Pomodoro; fn main() { let matches = App::new("Domasi") .version("0.1.0") .author("paoda ") .about("Yet another pomodoro timer.") .subcommand(SubCommand::with_name("start").about("Start the Pomodoro Timer")) .get_matches(); match matches.subcommand() { ("start", Some(args)) => start(args), _ => {} } } #[tokio::main] pub async fn start(_args: &ArgMatches) { let mut pomodoro = Pomodoro::default(); let config = Config::default(); pomodoro.start(config).await; }