From 8813ced13cdecd23c1af60a345d3794574a1d3f2 Mon Sep 17 00:00:00 2001 From: "Mr. Funk" Date: Thu, 9 May 2019 22:44:34 -0400 Subject: [PATCH] tools installed, reformatted --- src/main.rs | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/main.rs b/src/main.rs index 62c3e20..f6eea1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,25 +1,28 @@ use clap::*; fn main() { let app = App::new("sclient") - .arg(Arg::with_name("pattern") - .long("pattern") - .takes_value(true) - .required(true) - ) - .arg(Arg::with_name("servername") - .long("servername") - .takes_value(true) - .required(true) - ) - .arg(Arg::with_name("k") - .short("k") - .takes_value(true)// remove if t/f - .required(true) - ); - // println!("Hello, world!"); -// -let matches = app.get_matches(); - println!("{}",matches.value_of("pattern").unwrap()); + .arg( + Arg::with_name("pattern") + .long("pattern") + .takes_value(true) + .required(true), + ) + .arg( + Arg::with_name("servername") + .long("servername") + .takes_value(true) + .required(true), + ) + .arg( + Arg::with_name("k") + .short("k") + .takes_value(true) // remove if t/f + .required(true), + ); + // println!("Hello, world!"); + // + let matches = app.get_matches(); + println!("{}", matches.value_of("pattern").unwrap()); } // cargo run test @@ -29,8 +32,8 @@ let matches = app.get_matches(); // target/debug/sclient --pattern=kevin struct Cli { - pattern: String, - path: std::path::PathBuf, + pattern: String, + path: std::path::PathBuf, } // insecure := flag.Bool("k", false, "ignore bad TLS/SSL/HTTPS certificates") // servername := flag.String("servername", "", "specify a servername different from (to disable SNI use an IP as and do use this option)")