Archived
1
0
Fork 0

feat(cli): add structopt

This commit is contained in:
Dmitriy Pleshevskiy 2021-01-31 02:38:35 +03:00
parent d22af2231c
commit a9b3351d82
3 changed files with 32 additions and 1 deletions

View file

@ -1,2 +1,2 @@
/target
/*/target
Cargo.lock

11
migra-cli/Cargo.toml Normal file
View file

@ -0,0 +1,11 @@
[package]
name = "migra-cli"
version = "0.1.0"
authors = ["Dmitriy Pleshevskiy <dmitriy@ideascup.me>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
migra-core = { path = '../migra-core' }
structopt = "0.3.21"

20
migra-cli/src/main.rs Normal file
View file

@ -0,0 +1,20 @@
#![deny(clippy::all)]
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
enum AppOpt {
Init,
}
fn main() {
let opt = AppOpt::from_args();
dbg!(&opt);
match opt {
AppOpt::Init => {
println!("unimplemented");
}
}
}