blob: 315c3be763962501b1f9c16d44fffd7e8335d0bf (
plain) (
tree)
|
|
use std::{env::args, process};
mod cpu;
mod memory;
fn main() {
let args: Vec<String> = 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);
}
}
}
|