CLI args testing

cli
E. Almqvist 2 years ago
parent 61d69b14c5
commit 8f1c2377b9
  1. 1
      Cargo.toml
  2. 11
      src/cli.rs
  3. 1
      src/main.rs

@ -9,3 +9,4 @@ edition = "2021"
anyhow = "1" anyhow = "1"
log = "0.4" log = "0.4"
convert-base = "1.1.2" convert-base = "1.1.2"
clap = "3.2.16"

@ -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
}

@ -1,6 +1,7 @@
mod ipv4; mod ipv4;
mod scanner; mod scanner;
mod util; mod util;
mod cli;
//use ipv4::IPv4; //use ipv4::IPv4;

Loading…
Cancel
Save