mod config; use crate::config::CONFIG; use clap::{Parser, Subcommand}; use log::{debug, info, log, warn}; #[derive(Parser)] #[command(author, version, about)] #[command(propagate_version = true)] struct Cli { #[command(subcommand)] command: Option<Commands>, } #[derive(Subcommand)] enum Commands { /// Starts uwusched Start { role: Option<String> }, } fn get_type_of<T>(_: &T) -> &'static str { std::any::type_name::<T>() } fn main() { std::env::set_var("RUST_LOG", CONFIG.log.level.clone()); pretty_env_logger::init(); // debug!("{:?}", CONFIG.node); let cli = Cli::parse(); match &cli.command { Some(Commands::Start { role }) => { debug!("{:#?}", role) } None => {} } }