fix(dtmt): Fix dictionary lookup for all groups
Rather than checking all groups, when no cli flag was given, no groups were checked.
This commit is contained in:
parent
036c20bd8c
commit
110108004d
1 changed files with 13 additions and 1 deletions
|
@ -29,6 +29,17 @@ impl From<HashGroup> for sdk::murmur::HashGroup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for HashGroup {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
match self {
|
||||||
|
HashGroup::Filename => write!(f, "filename"),
|
||||||
|
HashGroup::Filetype => write!(f, "filetype"),
|
||||||
|
HashGroup::Strings => write!(f, "strings"),
|
||||||
|
HashGroup::Other => write!(f, "other"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(cli_table::Table)]
|
#[derive(cli_table::Table)]
|
||||||
struct TableRow {
|
struct TableRow {
|
||||||
#[table(title = "Value")]
|
#[table(title = "Value")]
|
||||||
|
@ -68,7 +79,8 @@ pub(crate) fn command_definition() -> Command {
|
||||||
.short('g')
|
.short('g')
|
||||||
.long("group")
|
.long("group")
|
||||||
.action(ArgAction::Append)
|
.action(ArgAction::Append)
|
||||||
.value_parser(value_parser!(HashGroup)),
|
.value_parser(value_parser!(HashGroup))
|
||||||
|
.default_values(["other", "filename", "filetype", "strings"]),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
|
|
Loading…
Add table
Reference in a new issue