Skip to content

Commit

Permalink
Merge pull request #207 from sksat/renovate/clap-3.x
Browse files Browse the repository at this point in the history
fix(deps): update rust crate clap to v3
  • Loading branch information
sksat authored Jan 1, 2022
2 parents 8292a5c + 34d9a2f commit 69c2ee5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 50 deletions.
57 changes: 18 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ anyhow = "1.0.52"
actix-web = "4.0.0-beta.18"
async-trait = "0.1.52"
bytes = "1.1.0"
clap = "2.34.0"
clap = "3.0.0"
cloudflare = "0.9.0"
domain = { version = "0.6.1", features = ["master"] }
env_logger = "0.9.0"
Expand Down
20 changes: 10 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,31 @@ async fn main() -> std::io::Result<()> {
.author(env!("CARGO_PKG_AUTHORS"))
.about(env!("CARGO_PKG_DESCRIPTION"))
.arg(
Arg::with_name("config")
.short("c")
Arg::new("config")
.short('c')
.long("config")
.value_name("FILE")
.default_value("./config.toml")
.help("set config file")
.takes_value(true),
)
.arg(
Arg::with_name("debug")
Arg::new("debug")
.long("debug")
.short("d")
.short('d')
.help("print debug information verbosely"),
)
.subcommand(clap::SubCommand::with_name("srv").about("start server"))
.subcommand(clap::App::new("srv").about("start server"))
.subcommand(
clap::SubCommand::with_name("add")
clap::App::new("add")
.about("add kuso subdomain")
.arg(Arg::with_name("subdomain").required(true).help("subdomain"))
.arg(Arg::with_name("target").required(true).help("target URL")),
.arg(Arg::new("subdomain").required(true).help("subdomain"))
.arg(Arg::new("target").required(true).help("target URL")),
)
.subcommand(
clap::SubCommand::with_name("delete")
clap::App::new("delete")
.about("delete kuso subdomain")
.arg(Arg::with_name("subdomain").required(true).help("subdomain")),
.arg(Arg::new("subdomain").required(true).help("subdomain")),
)
.get_matches();

Expand Down

0 comments on commit 69c2ee5

Please sign in to comment.