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"
)
// PathHelpCommand is a Command that lists the mounts.
type PathHelpCommand struct {
Meta
meta.Meta
}
func (c *PathHelpCommand) Run(args []string) int {
flags := c.Meta.FlagSet("help", FlagSetDefault)
flags := c.Meta.FlagSet("help", meta.FlagSetDefault)
flags.Usage = func() { c.Ui.Error(c.Help()) }
if err := flags.Parse(args); err != nil {
return 1
@@ -70,6 +72,6 @@ Usage: vault path-help [options] path
General Options:
` + generalOptionsUsage()
` + meta.GeneralOptionsUsage()
return strings.TrimSpace(helpText)
}