Skip to content

Commit 89c61b0

Browse files
author
syui
committed
u seahorse 1.0.0
1 parent 2f5449c commit 89c61b0

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ edition = "2018"
88
url = "1.7"
99
pretty_env_logger = "0.2"
1010
base64 = "0.9.2"
11-
seahorse = "0.7.1"
11+
seahorse = "1.0.0"
1212
dns-lookup = "1.0.2"

src/main.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ use dns_lookup::{getaddrinfo, AddrInfoHints, SockType};
66

77
fn main() {
88
let args: Vec<String> = env::args().collect();
9-
let app = App::new()
10-
.name(env!("CARGO_PKG_NAME"))
9+
let app = App::new(env!("CARGO_PKG_NAME"))
1110
.author(env!("CARGO_PKG_AUTHORS"))
1211
.version(env!("CARGO_PKG_VERSION"))
1312
.usage("cli_tool [command] [x] [y]")
1413
.command(
15-
Command::new()
16-
.name("e")
14+
Command::new("e")
1715
.usage("udrs e {}")
1816
.action(e),
1917
)
2018
.command(
21-
Command::new()
22-
.name("d")
19+
Command::new("d")
2320
.usage("udrs d {}")
2421
.action(d),
2522
)
@@ -74,40 +71,39 @@ fn ud_a(c: &Context) {
7471
}
7572

7673
fn ud_c() -> Command {
77-
Command::new()
78-
.name("ud")
74+
Command::new("ud")
7975
.usage("cli ud [url...]")
8076
.action(ud_a)
8177
.flag(
8278
Flag::new(
8379
"lpath",
84-
"cli ud [url...] --lpath(-l)",
8580
FlagType::Bool,
8681
)
82+
.usage("udrs ud [url...] --lpath(-l)")
8783
.alias("l"),
8884
)
8985
.flag(
9086
Flag::new(
9187
"domain",
92-
"cli ud [url...] --domain(-d)",
9388
FlagType::Bool,
9489
)
90+
.usage("udrs ud [url...] --domain(-d)")
9591
.alias("d"),
9692
)
9793
.flag(
9894
Flag::new(
9995
"protocol",
100-
"cli ud [url...] --protocol(-p)",
10196
FlagType::Bool,
10297
)
98+
.usage("udrs ud [url...] --protocol(-p)")
10399
.alias("p"),
104100
)
105101
.flag(
106102
Flag::new(
107103
"ip",
108-
"cli ud [url...] --ip(-i)",
109104
FlagType::Bool,
110105
)
106+
.usage("udrs ud [url...] --ip(-i)")
111107
.alias("i"),
112108
)
113109
}

0 commit comments

Comments
 (0)