mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Added json output function
This commit is contained in:
committed by
andy.boot
parent
a3dcab9454
commit
184ea1f956
@@ -29,6 +29,7 @@ pub struct Config {
|
||||
pub depth: Option<usize>,
|
||||
pub bars_on_right: Option<bool>,
|
||||
pub stack_size: Option<usize>,
|
||||
pub output_json: Option<bool>,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
@@ -117,6 +118,9 @@ impl Config {
|
||||
from_cmd_line.copied()
|
||||
}
|
||||
}
|
||||
pub fn get_output_json(&self, options: &ArgMatches) -> bool {
|
||||
Some(true) == self.output_json || options.get_flag("output_json")
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_min_size(input: &str) -> Option<usize> {
|
||||
|
||||
Reference in New Issue
Block a user