diff options
| author | Fuwn <[email protected]> | 2021-03-29 13:31:02 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-03-29 13:31:02 +0000 |
| commit | 5dc613894d6fdd995100a619566823221114dab1 (patch) | |
| tree | 15d0478c896f198fa702883c50474efaffcf2a11 /src/cli.rs | |
| parent | feature: Implement CLI (diff) | |
| download | whirl-5dc613894d6fdd995100a619566823221114dab1.tar.xz whirl-5dc613894d6fdd995100a619566823221114dab1.zip | |
feature: Use TOML as config instead of environment variables
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..f59139d --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,25 @@ +use structopt::StructOpt; + +#[derive(StructOpt, Debug)] +pub enum Command { + Run, + Config, +} + +#[derive(StructOpt, Debug)] +#[structopt( +name = env!("CARGO_PKG_NAME"), +about = env!("CARGO_PKG_DESCRIPTION"), +version = env!("CARGO_PKG_VERSION"), +author = env!("CARGO_PKG_AUTHORS"), +)] +pub struct Opt { + #[structopt(short, long)] + pub debug: bool, + + #[structopt(short, long, parse(from_occurrences))] + pub verbose: u8, + + #[structopt(subcommand)] // help + pub command: Command, +} |