util: use %w when forwarding an error

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-11-23 14:38:25 +01:00 committed by mergify[bot]
parent eb63e796a8
commit 7824cb5ed7

View File

@ -136,7 +136,7 @@ func InitVaultKMS(kmsID string, config, secrets map[string]string) (EncryptionKM
var vaultCAVerify bool var vaultCAVerify bool
vaultCAVerify, err = strconv.ParseBool(verifyCA) vaultCAVerify, err = strconv.ParseBool(verifyCA)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to parse 'vaultCAVerify' for vault <%s> kms config: %s", return nil, fmt.Errorf("failed to parse 'vaultCAVerify' for vault <%s> kms config: %w",
kmsID, err) kmsID, err)
} }
vaultConfig[api.EnvVaultInsecure] = !vaultCAVerify vaultConfig[api.EnvVaultInsecure] = !vaultCAVerify