summaryrefslogtreecommitdiffstats
path: root/cli/src/main.rs
blob: c4050ac3cdbe2178b65fa3b7adbe95008a7cc025 (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
28
use anyhow::Result;

mod cli;
mod profile;

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

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

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