minimal main
This commit is contained in:
parent
90948a1c83
commit
fefd102101
20
src/main.rs
20
src/main.rs
@ -1,5 +1,19 @@
|
||||
mod notes;
|
||||
use anyhow::Result;
|
||||
use rnote::{app, process};
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
mod rnote;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut app = app::make_app();
|
||||
|
||||
match rnote::app::make_app().get_matches().subcommand() {
|
||||
("new", Some(m)) => process::new(m)?,
|
||||
("remove", Some(m)) => process::remove(m)?,
|
||||
("edit", Some(m)) => process::edit(m)?,
|
||||
("list", Some(m)) => process::list(m)?,
|
||||
("search", Some(m)) => process::search(m)?,
|
||||
_ => app.print_long_help()?,
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user