feat: udpate clap args

This commit is contained in:
2023-11-05 17:32:45 +08:00
parent 5feb7b8b9c
commit 1bfe461a6b

View File

@@ -15,9 +15,11 @@ use rust_util::util_msg::{clear_lastline, flush_stdout};
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let matches = App::new("wacat-rs") let matches = App::new("wscat-rs")
.arg(Arg::with_name("connect").short("c").long("connect").takes_value(true).help("WebSocket URL")) .arg(Arg::with_name("connect").short("c").long("connect").takes_value(true)
.arg(Arg::with_name("disable-ping-pong").long("disable-ping-pong").help("Disable ping/pong")) .help("WebSocket URL, e.g. wss://example.com/websocket"))
.arg(Arg::with_name("disable-ping-pong").long("disable-ping-pong")
.help("Disable ping/pong"))
.get_matches(); .get_matches();
let connect = matches.value_of("connect").unwrap_or_else(|| { let connect = matches.value_of("connect").unwrap_or_else(|| {