use std::{env::args, process}; mod cpu; mod memory; fn main() { let args: Vec = args().collect(); if args.len() != 2 { eprintln!("Usage: yambar-modules cpu|memory"); process::exit(1); } match args[1].as_str() { "cpu" => { cpu::cpu(); } "memory" => { memory::memory(); } other => { eprintln!("'{other}' is not a valid command. Only 'cpu' or 'memory'."); process::exit(1); } } }