From faf04b84c8fdd965215cfc39c5482b670cec1e07 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 29 May 2016 02:21:29 +0200 Subject: [PATCH] Fix: Removed shadowing of variables (LINTER) --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index f5f0b67..fb1819d 100644 --- a/main.go +++ b/main.go @@ -55,17 +55,17 @@ func main() { } if cfg.VaultToken == "" { - loginSecret, err := client.Logical().Write("auth/app-id/login/"+cfg.VaultAppID, map[string]interface{}{ + loginSecret, lserr := client.Logical().Write("auth/app-id/login/"+cfg.VaultAppID, map[string]interface{}{ "user_id": cfg.VaultUserID, }) - if err != nil || loginSecret.Auth == nil { - log.Fatalf("Unable to fetch authentication token: %s", err) + if lserr != nil || loginSecret.Auth == nil { + log.Fatalf("Unable to fetch authentication token: %s", lserr) } client.SetToken(loginSecret.Auth.ClientToken) defer client.Auth().Token().RevokeSelf(client.Token()) } else { - client.SetToken(cfg.Token) + client.SetToken(cfg.VaultToken) } data, err := client.Logical().Read(rconfig.Args()[1])