tools installed, reformatted

This commit is contained in:
Mr. Funk 2019-05-09 22:44:34 -04:00
parent 3a8a76f5fe
commit 8813ced13c
1 changed files with 24 additions and 21 deletions

View File

@ -1,25 +1,28 @@
use clap::*; use clap::*;
fn main() { fn main() {
let app = App::new("sclient") let app = App::new("sclient")
.arg(Arg::with_name("pattern") .arg(
.long("pattern") Arg::with_name("pattern")
.takes_value(true) .long("pattern")
.required(true) .takes_value(true)
) .required(true),
.arg(Arg::with_name("servername") )
.long("servername") .arg(
.takes_value(true) Arg::with_name("servername")
.required(true) .long("servername")
) .takes_value(true)
.arg(Arg::with_name("k") .required(true),
.short("k") )
.takes_value(true)// remove if t/f .arg(
.required(true) Arg::with_name("k")
); .short("k")
// println!("Hello, world!"); .takes_value(true) // remove if t/f
// .required(true),
let matches = app.get_matches(); );
println!("{}",matches.value_of("pattern").unwrap()); // println!("Hello, world!");
//
let matches = app.get_matches();
println!("{}", matches.value_of("pattern").unwrap());
} }
// cargo run test // cargo run test
@ -29,8 +32,8 @@ let matches = app.get_matches();
// target/debug/sclient --pattern=kevin // target/debug/sclient --pattern=kevin
struct Cli { struct Cli {
pattern: String, pattern: String,
path: std::path::PathBuf, path: std::path::PathBuf,
} }
// insecure := flag.Bool("k", false, "ignore bad TLS/SSL/HTTPS certificates") // insecure := flag.Bool("k", false, "ignore bad TLS/SSL/HTTPS certificates")
// servername := flag.String("servername", "", "specify a servername different from <remote> (to disable SNI use an IP as <remote> and do use this option)") // servername := flag.String("servername", "", "specify a servername different from <remote> (to disable SNI use an IP as <remote> and do use this option)")