aboutsummaryrefslogtreecommitdiffstats
path: root/handlers_meta.go
diff options
context:
space:
mode:
Diffstat (limited to 'handlers_meta.go')
-rw-r--r--handlers_meta.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/handlers_meta.go b/handlers_meta.go
index f0f7ef7..6394cb3 100644
--- a/handlers_meta.go
+++ b/handlers_meta.go
@@ -20,17 +20,15 @@ func printHelp(ctx cli.Context) {
func printCommandHelp(ctx cli.Context) {
args := ctx.Args()
- prefix := []string{args.String("command")}
- printCommandPrefixHelp(prefix, ctx)
+ printCommandPrefixHelp(ctx, args.String("command"))
}
func printSubCommandHelp(ctx cli.Context) {
args := ctx.Args()
- prefix := []string{args.String("command"), args.String("subcommand")}
- printCommandPrefixHelp(prefix, ctx)
+ printCommandPrefixHelp(ctx, args.String("command"), args.String("subcommand"))
}
-func printCommandPrefixHelp(prefix []string, ctx cli.Context) {
+func printCommandPrefixHelp(ctx cli.Context, prefix ...string) {
handler := getHandler(ctx.Handlers(), prefix)
if handler == nil {