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"
)
// PolicyListCommand is a Command that enables a new endpoint.
type PolicyListCommand struct {
Meta
meta.Meta
}
func (c *PolicyListCommand) Run(args []string) int {
flags := c.Meta.FlagSet("policy-list", FlagSetDefault)
flags := c.Meta.FlagSet("policy-list", meta.FlagSetDefault)
flags.Usage = func() { c.Ui.Error(c.Help()) }
if err := flags.Parse(args); err != nil {
return 1
@@ -86,6 +88,6 @@ Usage: vault policies [options] [name]
General Options:
` + generalOptionsUsage()
` + meta.GeneralOptionsUsage()
return strings.TrimSpace(helpText)
}