diff --git a/Cargo.toml b/Cargo.toml index 78b3d13..76826c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,4 @@ edition = "2021" anyhow = "1" log = "0.4" convert-base = "1.1.2" +clap = "3.2.16" diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..44dc856 --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,11 @@ +use clap::Parser; + +#[derive(Parser, Debug)] +#[clap(author, version, about, long_about = None)] +struct Args { + #[clap(short, long, value_parser)] + name: String, + + #[clap(short, long, value_parser, defualt_value_t = 1)] + count: u8 +} diff --git a/src/main.rs b/src/main.rs index c536bf0..a5ea142 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ mod ipv4; mod scanner; mod util; +mod cli; //use ipv4::IPv4;