mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fix for cmd
This commit is contained in:
@@ -24,7 +24,7 @@ public class Cmd {
|
||||
run(),
|
||||
await(Arg.of("alias_name")),
|
||||
stop(Arg.of("alias_name")),
|
||||
waitmillis(Arg.of("millis_to_wait", Long::parseLong));
|
||||
waitMillis(Arg.of("millis_to_wait", Long::parseLong));
|
||||
|
||||
private final Arg<?>[] positional;
|
||||
|
||||
@@ -40,6 +40,15 @@ public class Cmd {
|
||||
return names;
|
||||
}
|
||||
|
||||
public static CmdType valueOfAnyCase(String cmdname) {
|
||||
for (CmdType value : values()) {
|
||||
if (cmdname.equals(value.toString()) || cmdname.toLowerCase().equals(value.toString().toLowerCase())) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return valueOf(cmdname); // let the normal exception take over in this case
|
||||
}
|
||||
|
||||
public Arg<?>[] getPositionalArgs() {
|
||||
return positional;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user