refactored the project using the clap crate

This commit is contained in:
2023-03-08 21:35:15 +01:00
parent e469576d2c
commit 4b789e60c9
10 changed files with 92 additions and 233 deletions

View File

@@ -2,7 +2,7 @@ use clap::Parser;
use self::structure::Args;
mod structure;
pub mod structure;
pub fn args() -> Args {
return Args::parse();

View File

@@ -3,11 +3,11 @@ use clap::{Parser, Subcommand};
#[derive(Parser)]
pub struct Args {
#[command(subcommand)]
command: CommandArg
pub command: CommandArg
}
#[derive(Subcommand)]
enum CommandArg {
pub enum CommandArg {
Build,
Health,
InstallReveal