osdb/src/main.rs

23 lines
621 B
Rust
Raw Normal View History

use osdb::branding::startup_msg;
use osdb::cli::read_input;
use osdb::command::Command;
use osdb::meta_commands::MetaCommand;
2025-05-01 19:24:18 +02:00
fn main() {
2025-05-01 21:00:28 +02:00
startup_msg();
while let Some(input) = read_input() {
match input.parse() {
Ok(cmd) => match cmd {
Command::MetaCommand(cmd) => match cmd {
MetaCommand::Exit => {
println!("Good-bye");
break;
}
},
Command::Statement(stmt) => stmt.execute(),
2025-05-01 21:00:28 +02:00
},
Err(err) => eprintln!("{err}"),
}
}
}