tools installed, reformatted
This commit is contained in:
parent
3a8a76f5fe
commit
8813ced13c
23
src/main.rs
23
src/main.rs
|
@ -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(
|
||||||
|
Arg::with_name("pattern")
|
||||||
.long("pattern")
|
.long("pattern")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true),
|
||||||
)
|
)
|
||||||
.arg(Arg::with_name("servername")
|
.arg(
|
||||||
|
Arg::with_name("servername")
|
||||||
.long("servername")
|
.long("servername")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true),
|
||||||
)
|
)
|
||||||
.arg(Arg::with_name("k")
|
.arg(
|
||||||
|
Arg::with_name("k")
|
||||||
.short("k")
|
.short("k")
|
||||||
.takes_value(true)// remove if t/f
|
.takes_value(true) // remove if t/f
|
||||||
.required(true)
|
.required(true),
|
||||||
);
|
);
|
||||||
// println!("Hello, world!");
|
// println!("Hello, world!");
|
||||||
//
|
//
|
||||||
let matches = app.get_matches();
|
let matches = app.get_matches();
|
||||||
println!("{}",matches.value_of("pattern").unwrap());
|
println!("{}", matches.value_of("pattern").unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
// cargo run test
|
// cargo run test
|
||||||
|
|
Loading…
Reference in New Issue