Move meta into its own package

This commit is contained in:
Jeff Mitchell
2016-04-01 13:16:05 -04:00
parent da00982529
commit 33326b30c3
79 changed files with 326 additions and 233 deletions

View File

@@ -3,15 +3,17 @@ package command
import (
"fmt"
"strings"
"github.com/hashicorp/vault/meta"
)
// PolicyDeleteCommand is a Command that enables a new endpoint.
type PolicyDeleteCommand struct {
Meta
meta.Meta
}
func (c *PolicyDeleteCommand) Run(args []string) int {
flags := c.Meta.FlagSet("policy-delete", FlagSetDefault)
flags := c.Meta.FlagSet("policy-delete", meta.FlagSetDefault)
flags.Usage = func() { c.Ui.Error(c.Help()) }
if err := flags.Parse(args); err != nil {
return 1
@@ -59,6 +61,6 @@ Usage: vault policy-delete [options] name
General Options:
` + generalOptionsUsage()
` + meta.GeneralOptionsUsage()
return strings.TrimSpace(helpText)
}