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

@@ -8,11 +8,12 @@ import (
"strings"
"github.com/hashicorp/vault/helper/kv-builder"
"github.com/hashicorp/vault/meta"
)
// WriteCommand is a Command that puts data into the Vault.
type WriteCommand struct {
Meta
meta.Meta
// The fields below can be overwritten for tests
testStdin io.Reader
@@ -21,7 +22,7 @@ type WriteCommand struct {
func (c *WriteCommand) Run(args []string) int {
var field, format string
var force bool
flags := c.Meta.FlagSet("write", FlagSetDefault)
flags := c.Meta.FlagSet("write", meta.FlagSetDefault)
flags.StringVar(&format, "format", "table", "")
flags.StringVar(&field, "field", "", "")
flags.BoolVar(&force, "force", false, "")
@@ -134,7 +135,7 @@ Usage: vault write [options] path [data]
General Options:
` + generalOptionsUsage() + `
` + meta.GeneralOptionsUsage() + `
Write Options: