diff --git a/command/audit_disable.go b/command/audit_disable.go index bdace6f00..0dae565cf 100644 --- a/command/audit_disable.go +++ b/command/audit_disable.go @@ -65,7 +65,6 @@ Usage: vault audit-disable [options] id type of the backend). General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/audit_enable.go b/command/audit_enable.go index adeb38204..21f5f23a4 100644 --- a/command/audit_enable.go +++ b/command/audit_enable.go @@ -96,9 +96,7 @@ Usage: vault audit-enable [options] type [config...] Example: vault audit-enable file path=audit.log General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Audit Enable Options: -description= A human-friendly description for the backend. This diff --git a/command/audit_list.go b/command/audit_list.go index f0b55bc40..20c070f13 100644 --- a/command/audit_list.go +++ b/command/audit_list.go @@ -79,7 +79,6 @@ Usage: vault audit-list [options] only a root Vault user can view this. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/auth_disable.go b/command/auth_disable.go index f3a450384..a8783067d 100644 --- a/command/auth_disable.go +++ b/command/auth_disable.go @@ -64,7 +64,6 @@ Usage: vault auth-disable [options] path If the command is exited early, the tokens will still be revoked. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/auth_enable.go b/command/auth_enable.go index 9c55197ca..882d97985 100644 --- a/command/auth_enable.go +++ b/command/auth_enable.go @@ -72,9 +72,7 @@ Usage: vault auth-enable [options] type access Vault. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Auth Enable Options: -description= Human-friendly description of the purpose for the diff --git a/command/capabilities.go b/command/capabilities.go index d2d5a3e03..bb60bd4ea 100644 --- a/command/capabilities.go +++ b/command/capabilities.go @@ -82,7 +82,6 @@ Usage: vault capabilities [options] [token] path is invalid, this command will respond with a ["deny"]. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/delete.go b/command/delete.go index 596b12bed..c5105bbc7 100644 --- a/command/delete.go +++ b/command/delete.go @@ -62,7 +62,6 @@ Usage: vault delete [options] path whether delete is supported for a path and what the behavior is. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/generate-root.go b/command/generate-root.go index 04246ecf1..08a425258 100644 --- a/command/generate-root.go +++ b/command/generate-root.go @@ -315,9 +315,7 @@ Usage: vault generate-root [options] [key] final token value will be encrypted with this public key and base64-encoded. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Rekey Options: -init Initialize the root generation attempt. This can only diff --git a/command/init.go b/command/init.go index 35f9c6296..61a5e17ab 100644 --- a/command/init.go +++ b/command/init.go @@ -106,9 +106,7 @@ Usage: vault init [options] This command can't be called on an already-initialized Vault. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Init Options: -check Don't actually initialize, just check if Vault is diff --git a/command/key_status.go b/command/key_status.go index 9140e5f6e..ff1b0860c 100644 --- a/command/key_status.go +++ b/command/key_status.go @@ -50,7 +50,6 @@ Usage: vault key-status [options] the current key term and the key installation time. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/list.go b/command/list.go index 7701933f0..0573c9b1b 100644 --- a/command/list.go +++ b/command/list.go @@ -83,9 +83,7 @@ Usage: vault list [options] path and endpoint-specific. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Read Options: -format=table The format for output. By default it is a whitespace- diff --git a/command/mount.go b/command/mount.go index 919317bee..bfdba8759 100644 --- a/command/mount.go +++ b/command/mount.go @@ -83,9 +83,7 @@ Usage: vault mount [options] type secrets. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Mount Options: -description= Human-friendly description of the purpose for diff --git a/command/mounts.go b/command/mounts.go index 7850cf8ee..823aa57e7 100644 --- a/command/mounts.go +++ b/command/mounts.go @@ -86,7 +86,6 @@ Usage: vault mounts [options] A TTL of 'system' indicates that the system default is being used. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/mounttune.go b/command/mounttune.go index 5f335aa48..c90fa781b 100644 --- a/command/mounttune.go +++ b/command/mounttune.go @@ -71,9 +71,7 @@ func (c *MountTuneCommand) Help() string { Example: vault mount-tune -default-lease-ttl="24h" secret General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Mount Options: -default-lease-ttl= Default lease time-to-live for this backend. diff --git a/command/path_help.go b/command/path_help.go index 3983f32e7..27d1313c5 100644 --- a/command/path_help.go +++ b/command/path_help.go @@ -71,7 +71,6 @@ Usage: vault path-help [options] path the mount points of the backends are unknown. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/policy_delete.go b/command/policy_delete.go index b76d63615..ff8342a62 100644 --- a/command/policy_delete.go +++ b/command/policy_delete.go @@ -60,7 +60,6 @@ Usage: vault policy-delete [options] name doesn't exist, it is identical to not being associated with that policy. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/policy_list.go b/command/policy_list.go index ee9441325..73cb9c5b4 100644 --- a/command/policy_list.go +++ b/command/policy_list.go @@ -87,7 +87,6 @@ Usage: vault policies [options] [name] If a name of a policy is specified, that policy is outputted. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/policy_write.go b/command/policy_write.go index 2592ae91b..4f73ffe13 100644 --- a/command/policy_write.go +++ b/command/policy_write.go @@ -84,7 +84,6 @@ Usage: vault policy-write [options] name path loaded from the file at the given path. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/read.go b/command/read.go index aa15b4636..39b821855 100644 --- a/command/read.go +++ b/command/read.go @@ -101,9 +101,7 @@ Usage: vault read [options] path backends in use to determine key structure. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Read Options: -format=table The format for output. By default it is a whitespace- diff --git a/command/rekey.go b/command/rekey.go index 4296fdd1b..9f5103033 100644 --- a/command/rekey.go +++ b/command/rekey.go @@ -301,9 +301,7 @@ Usage: vault rekey [options] [key] keys be provided. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Rekey Options: -init Initialize the rekey operation by setting the desired diff --git a/command/remount.go b/command/remount.go index c34d80f4f..47d591bee 100644 --- a/command/remount.go +++ b/command/remount.go @@ -68,8 +68,7 @@ Usage: vault remount [options] from to Example: vault remount secret/ generic/ General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/renew.go b/command/renew.go index bbe436f2d..37b97943a 100644 --- a/command/renew.go +++ b/command/renew.go @@ -80,9 +80,7 @@ Usage: vault renew [options] id [increment] is not required to honor this request. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Renew Options: -format=table The format for output. By default it is a whitespace- diff --git a/command/revoke.go b/command/revoke.go index b8dfe7886..4367d6faf 100644 --- a/command/revoke.go +++ b/command/revoke.go @@ -82,9 +82,7 @@ Usage: vault revoke [options] id lightly. This option requires -prefix. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Revoke Options: -prefix=true Revoke all secrets with the matching prefix. This diff --git a/command/rotate.go b/command/rotate.go index 788936920..9da387370 100644 --- a/command/rotate.go +++ b/command/rotate.go @@ -62,7 +62,6 @@ Usage: vault rotate [options] disruptive. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/seal.go b/command/seal.go index 10153c8c8..10d69a0d7 100644 --- a/command/seal.go +++ b/command/seal.go @@ -58,7 +58,6 @@ Usage: vault seal [options] This is the same as running "vault unseal -reset". General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/ssh.go b/command/ssh.go index 04537ab9b..7dbf999c0 100644 --- a/command/ssh.go +++ b/command/ssh.go @@ -256,9 +256,7 @@ Usage: vault ssh [options] username@ip See [https://github.com/hashicorp/vault-ssh-agent] General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` SSH Options: -role Role to be used to create the key. diff --git a/command/status.go b/command/status.go index 3edec9d5b..628d4f9f2 100644 --- a/command/status.go +++ b/command/status.go @@ -98,7 +98,6 @@ Usage: vault status [options] code also reflects the seal status (0 unsealed, 2 sealed, 1 error). General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/step-down.go b/command/step-down.go index 076a072ae..be445a838 100644 --- a/command/step-down.go +++ b/command/step-down.go @@ -50,7 +50,6 @@ Usage: vault step-down [options] same node to re-grab the lock and become active again. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/token_create.go b/command/token_create.go index bc3f5b3fb..aac0bea0a 100644 --- a/command/token_create.go +++ b/command/token_create.go @@ -109,9 +109,7 @@ Usage: vault token-create [options] If a role is specified, the role may override parameters specified here. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Token Options: -id="7699125c-d8...." The token value that clients will use to authenticate diff --git a/command/token_lookup.go b/command/token_lookup.go index 2ba512821..c1c62ef71 100644 --- a/command/token_lookup.go +++ b/command/token_lookup.go @@ -85,9 +85,7 @@ Usage: vault token-lookup [options] [token|accessor] '-accessor' flag. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Token Lookup Options: -accessor A boolean flag, if set, treats the argument as an accessor of the token. Note that the response of the command when this is set, will not contain diff --git a/command/token_renew.go b/command/token_renew.go index ee441eb54..3f78cb37a 100644 --- a/command/token_renew.go +++ b/command/token_renew.go @@ -98,9 +98,7 @@ Usage: vault token-renew [options] [token] [increment] well; otherwise it must be passed in via the '-increment' flag. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Token Renew Options: -increment=3600 The desired increment. If not supplied, Vault will diff --git a/command/token_revoke.go b/command/token_revoke.go index fe08a8fa4..0398010e2 100644 --- a/command/token_revoke.go +++ b/command/token_revoke.go @@ -101,9 +101,7 @@ Usage: vault token-revoke [options] [token|accessor] a token accessor always revokes the token along with it's child tokens. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Token Options: -accessor A boolean flag, if set, treats the argument as an accessor of the token. diff --git a/command/unmount.go b/command/unmount.go index dd2e32d68..104255f14 100644 --- a/command/unmount.go +++ b/command/unmount.go @@ -62,7 +62,6 @@ Usage: vault unmount [options] path by this backend will be revoked and its Vault data will be deleted. General Options: - - ` + meta.GeneralOptionsUsage() +` + meta.GeneralOptionsUsage() return strings.TrimSpace(helpText) } diff --git a/command/unseal.go b/command/unseal.go index b666d0381..ae5618233 100644 --- a/command/unseal.go +++ b/command/unseal.go @@ -115,9 +115,7 @@ Usage: vault unseal [options] [key] only exists to assist in scripting. General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Unseal Options: -reset Reset the unsealing process by throwing away diff --git a/command/write.go b/command/write.go index eef4166b8..e289da28a 100644 --- a/command/write.go +++ b/command/write.go @@ -134,9 +134,7 @@ Usage: vault write [options] path [data] prefix the "@" with a slash: "\@". General Options: - - ` + meta.GeneralOptionsUsage() + ` - +` + meta.GeneralOptionsUsage() + ` Write Options: -f | -force Force the write to continue without any data values diff --git a/meta/meta.go b/meta/meta.go index cd07d0f57..65e10fe20 100644 --- a/meta/meta.go +++ b/meta/meta.go @@ -12,7 +12,6 @@ import ( "net/http" "os" "path/filepath" - "strings" "github.com/hashicorp/errwrap" "github.com/hashicorp/vault/api" @@ -261,7 +260,7 @@ func GeneralOptionsUsage() string { -client-cert=path Path to a PEM encoded client certificate for TLS authentication to the Vault server. Must also specify - -client-key. Overrides the VAULT_CLIENT_CERT + -client-key. Overrides the VAULT_CLIENT_CERT environment variable if set. -client-key=path Path to an unencrypted PEM encoded private key @@ -270,8 +269,8 @@ func GeneralOptionsUsage() string { if set. -tls-skip-verify Do not verify TLS certificate. This is highly - not recommended. Verification will also be skipped + not recommended. Verification will also be skipped if VAULT_SKIP_VERIFY is set. - ` - return strings.TrimSpace(general) +` + return general }