Change additional options usage in meta to a func to remove build tags.
This commit is contained in:
parent
37f3b2bafd
commit
ad66ed85fd
17
meta/meta.go
17
meta/meta.go
|
@ -23,6 +23,21 @@ const (
|
|||
FlagSetDefault = FlagSetServer
|
||||
)
|
||||
|
||||
var (
|
||||
additionalOptionsUsage = func() string {
|
||||
return `
|
||||
-wrap-ttl="" Indicates that the response should be wrapped in a
|
||||
cubbyhole token with the requested TTL. The response
|
||||
can be fetched by calling the "sys/wrapping/unwrap"
|
||||
endpoint, passing in the wrappping token's ID. This
|
||||
is a numeric string with an optional suffix
|
||||
"s", "m", or "h"; if no suffix is specified it will
|
||||
be parsed as seconds. May also be specified via
|
||||
VAULT_WRAP_TTL.
|
||||
`
|
||||
}
|
||||
)
|
||||
|
||||
// Meta contains the meta-options and functionality that nearly every
|
||||
// Vault command inherits.
|
||||
type Meta struct {
|
||||
|
@ -188,6 +203,6 @@ func GeneralOptionsUsage() string {
|
|||
if VAULT_SKIP_VERIFY is set.
|
||||
`
|
||||
|
||||
general += AdditionalOptionsUsage()
|
||||
general += additionalOptionsUsage()
|
||||
return general
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
// +build !vault
|
||||
|
||||
package meta
|
||||
|
||||
func AdditionalOptionsUsage() string {
|
||||
return ""
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// +build vault
|
||||
|
||||
package meta
|
||||
|
||||
func AdditionalOptionsUsage() string {
|
||||
return `
|
||||
-wrap-ttl="" Indicates that the response should be wrapped in a
|
||||
cubbyhole token with the requested TTL. The response
|
||||
can be fetched by calling the "sys/wrapping/unwrap"
|
||||
endpoint, passing in the wrappping token's ID. This
|
||||
is a numeric string with an optional suffix
|
||||
"s", "m", or "h"; if no suffix is specified it will
|
||||
be parsed as seconds. May also be specified via
|
||||
VAULT_WRAP_TTL.
|
||||
`
|
||||
}
|
Loading…
Reference in New Issue