diff options
| author | Fuwn <[email protected]> | 2021-03-29 13:31:02 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-03-29 13:31:02 -0700 |
| commit | 12517eee14d79a2673338c94cbc0d091840b32a3 (patch) | |
| tree | e6092233c3236060974a35614861b20ef9bca88a /src/cli.rs | |
| parent | feature: Implement CLI (diff) | |
| download | whirl-12517eee14d79a2673338c94cbc0d091840b32a3.tar.xz whirl-12517eee14d79a2673338c94cbc0d091840b32a3.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, +} |