init params
This commit is contained in:
parent
43b69c2489
commit
d8a4990203
21
src/main.rs
21
src/main.rs
|
@ -1,3 +1,24 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|
||||||
|
let pattern = std::env::args().nth(1).expect("no pattern given");
|
||||||
|
let path = std::env::args().nth(2).expect("no path given");
|
||||||
|
let args = Cli {
|
||||||
|
pattern: pattern,
|
||||||
|
//path: std::path::PathBuf::from(path),
|
||||||
|
};
|
||||||
|
println!("{}",args.pattern)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cargo run test
|
||||||
|
|
||||||
|
struct Cli {
|
||||||
|
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 <remote> (to disable SNI use an IP as <remote> and do use this option)")
|
||||||
|
// flag.BoolVar(insecure, "insecure", false, "ignore bad TLS/SSL/HTTPS certificates")
|
||||||
|
// flag.Parse()
|
||||||
|
// remotestr := flag.Arg(0)
|
||||||
|
// localstr := flag.Arg(1)
|
||||||
|
|
Loading…
Reference in New Issue