command: Adding intermediate command for help text

This commit is contained in:
Armon Dadgar
2017-09-14 21:31:05 -07:00
parent 9de9a349d7
commit e17b4a31c7
2 changed files with 29 additions and 0 deletions

19
command/acl_policy.go Normal file
View File

@@ -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
}

View File

@@ -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,