From f983879992a79c589423afa405a86d797f37f467 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Mon, 14 Mar 2022 13:11:49 -0500 Subject: [PATCH] Fix description of StringSliceVar options (#14439) These options must be specified multiple times in order to be properly parsed. However, the present description suggests that a comma-separated list would work as well, however this isn't the case and results in a slice containing a single string (with all comma-separated values) in the API request. Clarify the argument help text to make this clearer. Signed-off-by: Alexander Scheel --- command/auth_enable.go | 16 ++++++++-------- command/auth_tune.go | 16 ++++++++-------- command/secrets_enable.go | 16 ++++++++-------- command/secrets_tune.go | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/command/auth_enable.go b/command/auth_enable.go index eb12589c44179..a23c7989f7a13 100644 --- a/command/auth_enable.go +++ b/command/auth_enable.go @@ -117,15 +117,15 @@ func (c *AuthEnableCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACRequestKeys, Target: &c.flagAuditNonHMACRequestKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the request data object.", + Usage: "Key that will not be HMAC'd by audit devices in the request data object. " + + "To specify multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACResponseKeys, Target: &c.flagAuditNonHMACResponseKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the response data object.", + Usage: "Key that will not be HMAC'd by audit devices in the response data object. " + + "To specify multiple values, specify this flag multiple times.", }) f.StringVar(&StringVar{ @@ -137,15 +137,15 @@ func (c *AuthEnableCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNamePassthroughRequestHeaders, Target: &c.flagPassthroughRequestHeaders, - Usage: "Comma-separated string or list of request header values that " + - "will be sent to the plugin", + Usage: "Request header value that will be sent to the plugin. To specify multiple " + + "values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAllowedResponseHeaders, Target: &c.flagAllowedResponseHeaders, - Usage: "Comma-separated string or list of response header values that " + - "plugins will be allowed to set", + Usage: "Response header value that plugins will be allowed to set. To specify multiple " + + "values, specify this flag multiple times.", }) f.StringVar(&StringVar{ diff --git a/command/auth_tune.go b/command/auth_tune.go index a3ad65579cdcf..9c3a963efc378 100644 --- a/command/auth_tune.go +++ b/command/auth_tune.go @@ -62,15 +62,15 @@ func (c *AuthTuneCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACRequestKeys, Target: &c.flagAuditNonHMACRequestKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the request data object.", + Usage: "Key that will not be HMAC'd by audit devices in the request data " + + "object. To specify multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACResponseKeys, Target: &c.flagAuditNonHMACResponseKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the response data object.", + Usage: "Key that will not be HMAC'd by audit devices in the response data " + + "object. To specify multiple values, specify this flag multiple times.", }) f.DurationVar(&DurationVar{ @@ -112,15 +112,15 @@ func (c *AuthTuneCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNamePassthroughRequestHeaders, Target: &c.flagPassthroughRequestHeaders, - Usage: "Comma-separated string or list of request header values that " + - "will be sent to the plugin", + Usage: "Request header value that will be sent to the plugin. To specify " + + "multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAllowedResponseHeaders, Target: &c.flagAllowedResponseHeaders, - Usage: "Comma-separated string or list of response header values that " + - "plugins will be allowed to set", + Usage: "Response header value that plugins will be allowed to set. To specify " + + "multiple values, specify this flag multiple times.", }) f.StringMapVar(&StringMapVar{ diff --git a/command/secrets_enable.go b/command/secrets_enable.go index 5b9c49ebe5810..91144c156639f 100644 --- a/command/secrets_enable.go +++ b/command/secrets_enable.go @@ -125,15 +125,15 @@ func (c *SecretsEnableCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACRequestKeys, Target: &c.flagAuditNonHMACRequestKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the request data object.", + Usage: "Key that will not be HMAC'd by audit devices in the request data object. " + + "To specify multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACResponseKeys, Target: &c.flagAuditNonHMACResponseKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the response data object.", + Usage: "Key that will not be HMAC'd by audit devices in the response data object. " + + "To specify multiple values, specify this flag multiple times.", }) f.StringVar(&StringVar{ @@ -145,15 +145,15 @@ func (c *SecretsEnableCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNamePassthroughRequestHeaders, Target: &c.flagPassthroughRequestHeaders, - Usage: "Comma-separated string or list of request header values that " + - "will be sent to the plugins", + Usage: "Request header value that will be sent to the plugins. To specify multiple " + + "values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAllowedResponseHeaders, Target: &c.flagAllowedResponseHeaders, - Usage: "Comma-separated string or list of response header values that " + - "plugins will be allowed to set", + Usage: "Response header value that plugins will be allowed to set. To specify multiple " + + "values, specify this flag multiple times.", }) f.BoolVar(&BoolVar{ diff --git a/command/secrets_tune.go b/command/secrets_tune.go index 93d656a7c71ee..002bdd9ea096c 100644 --- a/command/secrets_tune.go +++ b/command/secrets_tune.go @@ -62,15 +62,15 @@ func (c *SecretsTuneCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACRequestKeys, Target: &c.flagAuditNonHMACRequestKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the request data object.", + Usage: "Key that will not be HMAC'd by audit devices in the request data " + + "object. To specify multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAuditNonHMACResponseKeys, Target: &c.flagAuditNonHMACResponseKeys, - Usage: "Comma-separated string or list of keys that will not be HMAC'd by audit " + - "devices in the response data object.", + Usage: "Key that will not be HMAC'd by audit devices in the response data " + + "object. To specify multiple values, specify this flag multiple times.", }) f.DurationVar(&DurationVar{ @@ -112,15 +112,15 @@ func (c *SecretsTuneCommand) Flags() *FlagSets { f.StringSliceVar(&StringSliceVar{ Name: flagNamePassthroughRequestHeaders, Target: &c.flagPassthroughRequestHeaders, - Usage: "Comma-separated string or list of request header values that " + - "will be sent to the plugin", + Usage: "Request header value that will be sent to the plugin. To specify " + + "multiple values, specify this flag multiple times.", }) f.StringSliceVar(&StringSliceVar{ Name: flagNameAllowedResponseHeaders, Target: &c.flagAllowedResponseHeaders, - Usage: "Comma-separated string or list of response header values that " + - "plugins will be allowed to set", + Usage: "Response header value that plugins will be allowed to set. To " + + "specify multiple values, specify this flag multiple times.", }) f.StringMapVar(&StringMapVar{