From b5d2321d577cba5dff61a39bd9d568d51866dbd6 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 2 Aug 2021 11:35:26 +0200 Subject: [PATCH] cleanup: use vaultDefaultCAVerify to set default value Golang-ci complains about the following: internal/util/vault_tokens.go:99:20: string `true` has 4 occurrences, but such constant `vaultDefaultDestroyKeys` already exists (goconst) v.VaultCAVerify = "true" ^ This occurence of "true" can be replaced by vaultDefaultCAVerify so address the warning. Signed-off-by: Niels de Vos --- internal/util/vault_tokens.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util/vault_tokens.go b/internal/util/vault_tokens.go index 0eabe0feb..73eb7a19f 100644 --- a/internal/util/vault_tokens.go +++ b/internal/util/vault_tokens.go @@ -99,7 +99,7 @@ func (v *vaultTokenConf) convertStdVaultToCSIConfig(s *standardVault) { // by default the CA should get verified, only when VaultSkipVerify is // set, verification should be disabled - v.VaultCAVerify = "true" + v.VaultCAVerify = vaultDefaultCAVerify verify, err := strconv.ParseBool(s.VaultSkipVerify) if err == nil { v.VaultCAVerify = strconv.FormatBool(!verify)