osdb/src/main.rs

22 lines
580 B
Rust
Raw Normal View History

use osdb::branding::startup_msg;
use osdb::cli::read_input;
use osdb::command::Command;
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) => {
if cmd.execute().should_exit {
println!("Good-bye");
break;
}
}
Command::Statement(stmt) => stmt.execute(),
2025-05-01 21:00:28 +02:00
},
Err(err) => eprintln!("{err}"),
}
}
}