mirror of
https://github.com/Luzifer/vault2env.git
synced 2024-12-20 20:21:20 +00:00
Fix: Removed shadowing of variables (LINTER)
This commit is contained in:
parent
2fcf918296
commit
faf04b84c8
1 changed files with 4 additions and 4 deletions
8
main.go
8
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])
|
||||
|
|
Loading…
Reference in a new issue