migra/migra-cli/src/main.rs

24 lines
364 B
Rust
Raw Normal View History

2021-01-31 02:38:35 +03:00
#![deny(clippy::all)]
mod config;
2021-01-31 02:54:23 +03:00
mod opts;
2021-01-31 02:38:35 +03:00
use config::Config;
2021-01-31 02:54:23 +03:00
use opts::{AppOpt, StructOpt};
2021-01-31 02:38:35 +03:00
fn main() -> Result<(), Box<dyn std::error::Error>> {
2021-01-31 02:38:35 +03:00
let opt = AppOpt::from_args();
dbg!(&opt);
let config = Config::read();
dbg!(&config);
2021-01-31 02:38:35 +03:00
match opt {
AppOpt::Init => {
Config::initialize()?;
2021-01-31 02:38:35 +03:00
}
}
Ok(())
2021-01-31 02:38:35 +03:00
}