mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
command: Adding intermediate command for help text
This commit is contained in:
19
command/acl_policy.go
Normal file
19
command/acl_policy.go
Normal 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
|
||||
}
|
||||
10
commands.go
10
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,
|
||||
|
||||
Reference in New Issue
Block a user