use anyhow::Result; use clap::Parser; use rocie_client::apis::configuration::Configuration; use crate::cli::{CliArgs, Command}; mod cli; mod handle; #[tokio::main] async fn main() -> Result<()> { let args = CliArgs::parse(); let mut config = Configuration::new(); "http://127.0.0.1:8080".clone_into(&mut config.base_path); match args.command { Command::Product { command } => handle::product(&config, command).await?, Command::Unit { command } => handle::unit(&config, command).await?, Command::Barcode { command } => handle::barcode(&config, command).await?, Command::UnitProperty { command } => handle::unit_property(&config, command).await?, } Ok(()) }