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

@@ -5,16 +5,17 @@ import (
"strings"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/meta"
)
// StatusCommand is a Command that outputs the status of whether
// Vault is sealed or not as well as HA information.
type StatusCommand struct {
Meta
meta.Meta
}
func (c *StatusCommand) Run(args []string) int {
flags := c.Meta.FlagSet("status", FlagSetDefault)
flags := c.Meta.FlagSet("status", meta.FlagSetDefault)
flags.Usage = func() { c.Ui.Error(c.Help()) }
if err := flags.Parse(args); err != nil {
return 1
@@ -98,6 +99,6 @@ Usage: vault status [options]
General Options:
` + generalOptionsUsage()
` + meta.GeneralOptionsUsage()
return strings.TrimSpace(helpText)
}