mirror of
https://github.com/shimunn/gitredditor.git
synced 2023-11-17 18:42:43 +01:00
opt
This commit is contained in:
21
src/opts.rs
21
src/opts.rs
@@ -4,13 +4,28 @@ pub use structopt::StructOpt;
|
||||
#[derive(StructOpt, Debug)]
|
||||
#[structopt(name = "gitredditor")]
|
||||
pub struct Opts {
|
||||
#[structopt(short = "f", long = "fetch", default_value = "20", env = "GITREDDITOR_CNT")]
|
||||
#[structopt(
|
||||
short = "f",
|
||||
long = "fetch",
|
||||
default_value = "20",
|
||||
env = "GITREDDITOR_CNT"
|
||||
)]
|
||||
pub fetch: usize,
|
||||
|
||||
#[structopt(short = "t", long = "threshold", default_value = "5", env = "GITREDDITOR_TH")]
|
||||
#[structopt(
|
||||
short = "t",
|
||||
long = "threshold",
|
||||
default_value = "5",
|
||||
env = "GITREDDITOR_TH"
|
||||
)]
|
||||
pub threshold: u32,
|
||||
|
||||
#[structopt(short = "p", long = "threshold-percent", default_value = "5", env = "GITREDDITOR_THP")]
|
||||
#[structopt(
|
||||
short = "p",
|
||||
long = "threshold-percent",
|
||||
default_value = "5",
|
||||
env = "GITREDDITOR_THP"
|
||||
)]
|
||||
pub thresholdp: u8,
|
||||
|
||||
#[structopt(short = "r", long = "redditor", env = "GITREDDITOR_U")]
|
||||
|
||||
Reference in New Issue
Block a user