cuddle-v2/cuddle_cli/src/main.rs
2022-08-14 20:19:29 +02:00

30 lines
500 B
Rust

use config::CuddleConfig;
use tracing::Level;
mod actions;
mod cli;
mod config;
mod context;
mod model;
mod util;
fn main() -> anyhow::Result<()> {
init_logging()?;
let config = CuddleConfig::from_env()?;
let context = context::extract_cuddle(config.clone())?;
_ = cli::CuddleCli::new(context)?.execute()?;
Ok(())
}
fn init_logging() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.pretty()
.with_max_level(Level::INFO)
.init();
Ok(())
}