1
0
Fork 0
mirror of https://github.com/Luzifer/vault2env.git synced 2024-11-09 16:50:06 +00:00

Fix: Removed shadowing of variables (LINTER)

This commit is contained in:
Knut Ahlers 2016-05-29 02:21:29 +02:00
parent 2fcf918296
commit faf04b84c8
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

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