blob: 581877bd4f3ad297bf59176d2f68e30b4ecdc63e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
use anyhow::Result;
mod app;
mod cli;
mod timeline;
mod timeline_post;
fn main() -> Result<()> {
let _ = env_logger::try_init()?;
let matches = crate::cli::app().get_matches();
match matches.subcommand() {
None => {
let name = matches.value_of("name").map(String::from).unwrap(); // safe by clap
crate::app::run(name)
},
Some((other, _)) => {
log::error!("No subcommand {} implemented", other);
Ok(())
},
}
}
|