From 9f595ae797b7dc70bbf6f312c4dd5459e477f22c Mon Sep 17 00:00:00 2001 From: James Rasell Date: Mon, 6 Nov 2017 10:15:42 +0000 Subject: [PATCH] Fix panic on every run of the keyring command. This change removes the flag token declaration within keyring.go which caused a flag redefined panic on every command run as the token flag is specified in the command meta. --- command/keyring.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command/keyring.go b/command/keyring.go index 8b120ab1133d..6e4ee28fce52 100644 --- a/command/keyring.go +++ b/command/keyring.go @@ -68,7 +68,7 @@ func (c *KeyringCommand) AutocompleteArgs() complete.Predictor { } func (c *KeyringCommand) Run(args []string) int { - var installKey, useKey, removeKey, token string + var installKey, useKey, removeKey string var listKeys bool flags := c.Meta.FlagSet("keys", FlagSetClient) @@ -78,7 +78,6 @@ func (c *KeyringCommand) Run(args []string) int { flags.StringVar(&useKey, "use", "", "use key") flags.StringVar(&removeKey, "remove", "", "remove key") flags.BoolVar(&listKeys, "list", false, "list keys") - flags.StringVar(&token, "token", "", "acl token") if err := flags.Parse(args); err != nil { return 1