mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 20:45:29 +00:00
add version info flag
This commit is contained in:
parent
b7ffece867
commit
e00f8e5026
1 changed files with 5 additions and 0 deletions
|
|
@ -129,6 +129,7 @@ fn args() -> Result<Args> {
|
||||||
);
|
);
|
||||||
opts.optflag("s", "silent", "Disable logging output");
|
opts.optflag("s", "silent", "Disable logging output");
|
||||||
opts.optflag("h", "help", "Print this help menu and exit.");
|
opts.optflag("h", "help", "Print this help menu and exit.");
|
||||||
|
opts.optflag("V", "version", "Print version information and exit.");
|
||||||
opts.optflag(
|
opts.optflag(
|
||||||
"3",
|
"3",
|
||||||
"only-tls13",
|
"only-tls13",
|
||||||
|
|
@ -151,6 +152,10 @@ fn args() -> Result<Args> {
|
||||||
eprintln!("{}", opts.usage(&format!("Usage: {} [options]", &args[0])));
|
eprintln!("{}", opts.usage(&format!("Usage: {} [options]", &args[0])));
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
}
|
}
|
||||||
|
if matches.opt_present("V") {
|
||||||
|
eprintln!("agate {}", env!("CARGO_PKG_VERSION"));
|
||||||
|
std::process::exit(0);
|
||||||
|
}
|
||||||
let mut hostnames = vec![];
|
let mut hostnames = vec![];
|
||||||
for s in matches.opt_strs("hostname") {
|
for s in matches.opt_strs("hostname") {
|
||||||
hostnames.push(Host::parse(&s)?);
|
hostnames.push(Host::parse(&s)?);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue