mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
add cli
This commit is contained in:
@@ -31,6 +31,7 @@ pub struct Config {
|
||||
pub stack_size: Option<usize>,
|
||||
pub threads: Option<usize>,
|
||||
pub output_json: Option<bool>,
|
||||
pub print_errors: Option<bool>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -102,6 +103,10 @@ impl Config {
|
||||
pub fn get_only_dir(&self, options: &ArgMatches) -> bool {
|
||||
Some(true) == self.only_dir || options.get_flag("only_dir")
|
||||
}
|
||||
|
||||
pub fn get_print_errors(&self, options: &ArgMatches) -> bool {
|
||||
Some(true) == self.print_errors || options.get_flag("print_errors")
|
||||
}
|
||||
pub fn get_only_file(&self, options: &ArgMatches) -> bool {
|
||||
Some(true) == self.only_file || options.get_flag("only_file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user