From e17b4a31c7d9397a9ad73031d0a43f35d948bcba Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Thu, 14 Sep 2017 21:31:05 -0700 Subject: [PATCH] command: Adding intermediate command for help text --- command/acl_policy.go | 19 +++++++++++++++++++ commands.go | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 command/acl_policy.go diff --git a/command/acl_policy.go b/command/acl_policy.go new file mode 100644 index 000000000..43eaf26dc --- /dev/null +++ b/command/acl_policy.go @@ -0,0 +1,19 @@ +package command + +import "github.com/mitchellh/cli" + +type ACLPolicyCommand struct { + Meta +} + +func (f *ACLPolicyCommand) Help() string { + return "This command is accessed by using one of the subcommands below." +} + +func (f *ACLPolicyCommand) Synopsis() string { + return "Interact with ACL policies" +} + +func (f *ACLPolicyCommand) Run(args []string) int { + return cli.RunResultHelp +} diff --git a/commands.go b/commands.go index d45689244..31030dbe4 100644 --- a/commands.go +++ b/commands.go @@ -36,6 +36,16 @@ func Commands(metaPtr *command.Meta) map[string]cli.CommandFactory { Meta: meta, }, nil }, + "acl policy": func() (cli.Command, error) { + return &command.ACLPolicyCommand{ + Meta: meta, + }, nil + }, + "acl policy apply": func() (cli.Command, error) { + return &command.ACLPolicyApplyCommand{ + Meta: meta, + }, nil + }, "alloc-status": func() (cli.Command, error) { return &command.AllocStatusCommand{ Meta: meta,