added argument parsing and structure with clap
This commit is contained in:
10
src/app/args/mod.rs
Normal file
10
src/app/args/mod.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use clap::Parser;
|
||||
|
||||
use self::structure::Args;
|
||||
|
||||
mod structure;
|
||||
|
||||
pub fn args() -> Args {
|
||||
return Args::parse();
|
||||
|
||||
}
|
||||
12
src/app/args/structure.rs
Normal file
12
src/app/args/structure.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct Args {
|
||||
#[command(subcommand)]
|
||||
command: Option<CommandArg>
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum CommandArg {
|
||||
Build,
|
||||
}
|
||||
Reference in New Issue
Block a user