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.
This commit is contained in:
James Rasell
2017-11-06 10:15:42 +00:00
parent 0b3476aabd
commit 9f595ae797

View File

@@ -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