Andrey Tkachenko
47f8b48407
All checks were successful
continuous-integration/drone/push Build is passing
26 lines
463 B
Rust
26 lines
463 B
Rust
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Debug, Parser)]
|
|
#[clap(author, version, about, long_about = None)]
|
|
#[clap(propagate_version = true)]
|
|
pub struct Args {
|
|
#[clap(subcommand)]
|
|
cmd: ArgsCoommans,
|
|
}
|
|
|
|
#[derive(Debug, Subcommand)]
|
|
pub enum ArgsCoommans {
|
|
Info,
|
|
List,
|
|
Search { query: String },
|
|
Publish,
|
|
Login,
|
|
Add { name: String },
|
|
Remove { name: String },
|
|
Update,
|
|
}
|
|
|
|
pub fn main() {
|
|
println!("{:?}", Args::parse());
|
|
}
|