feat(cli): add normalizeVerb alias helper
This commit is contained in:
@@ -16,3 +16,15 @@ func uintSlice(us []uint32) []uint64 {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// normalizeVerb maps verb aliases to their canonical form. Applied at the
|
||||
// subcommand-verb position of every admin group and at the top-level command.
|
||||
func normalizeVerb(v string) string {
|
||||
switch v {
|
||||
case "rm", "del":
|
||||
return "remove"
|
||||
case "ls":
|
||||
return "list"
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user