summaryrefslogtreecommitdiffstats
path: root/cli/src/main.rs
blob: fea466c59e90413f5f427fb595cc5c0d2608e6d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use anyhow::Result;

mod cli;
mod commands;

fn main() -> Result<()> {
    let _ = env_logger::try_init()?;
    let matches = crate::cli::app().get_matches();

    match matches.subcommand() {
        Some(("profile", matches)) => crate::commands::profile(matches).await,
        Some(("gui", _)) => {
            unimplemented!()
        },
        Some((other, _)) => {
            log::error!("No subcommand {} implemented", other);
            Ok(())
        },

        _ => {
            log::error!("Don't know what to do");
            Ok(())
        },
    }
}