mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
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 <ndevos@redhat.com>
This commit is contained in:
parent
f584db41e6
commit
b5d2321d57
@ -99,7 +99,7 @@ func (v *vaultTokenConf) convertStdVaultToCSIConfig(s *standardVault) {
|
|||||||
|
|
||||||
// by default the CA should get verified, only when VaultSkipVerify is
|
// by default the CA should get verified, only when VaultSkipVerify is
|
||||||
// set, verification should be disabled
|
// set, verification should be disabled
|
||||||
v.VaultCAVerify = "true"
|
v.VaultCAVerify = vaultDefaultCAVerify
|
||||||
verify, err := strconv.ParseBool(s.VaultSkipVerify)
|
verify, err := strconv.ParseBool(s.VaultSkipVerify)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
v.VaultCAVerify = strconv.FormatBool(!verify)
|
v.VaultCAVerify = strconv.FormatBool(!verify)
|
||||||
|
Loading…
Reference in New Issue
Block a user