mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
cleanup: resolve revive linter issue
revive linter checks for var-declaration format. For example: "e2e/rbd_helper.go:441:36: var-declaration: should drop = nil from declaration of var noPVCValidation; it is the zero value (revive) var noPVCValidation validateFunc = nil" Updates: #1586 Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
parent
bd947bbe31
commit
bfda5fa57f
@ -38,7 +38,7 @@ type vaultConfig struct {
|
|||||||
// in the kms-config.yaml file. These variables can be passed on to validation
|
// in the kms-config.yaml file. These variables can be passed on to validation
|
||||||
// functions when a StorageClass has a KMS enabled.
|
// functions when a StorageClass has a KMS enabled.
|
||||||
var (
|
var (
|
||||||
noKMS kmsConfig = nil
|
noKMS kmsConfig
|
||||||
|
|
||||||
secretsMetadataKMS = &simpleKMS{
|
secretsMetadataKMS = &simpleKMS{
|
||||||
provider: "secrets-metadata",
|
provider: "secrets-metadata",
|
||||||
|
@ -434,7 +434,7 @@ type validateFunc func(f *framework.Framework, pvc *v1.PersistentVolumeClaim, ap
|
|||||||
|
|
||||||
// noPVCValidation can be used to pass to validatePVCClone when no extra
|
// noPVCValidation can be used to pass to validatePVCClone when no extra
|
||||||
// validation of the PVC is needed.
|
// validation of the PVC is needed.
|
||||||
var noPVCValidation validateFunc = nil
|
var noPVCValidation validateFunc
|
||||||
|
|
||||||
func isEncryptedPVC(f *framework.Framework, pvc *v1.PersistentVolumeClaim, app *v1.Pod) error {
|
func isEncryptedPVC(f *framework.Framework, pvc *v1.PersistentVolumeClaim, app *v1.Pod) error {
|
||||||
imageData, err := getImageInfoFromPVC(pvc.Namespace, pvc.Name, f)
|
imageData, err := getImageInfoFromPVC(pvc.Namespace, pvc.Name, f)
|
||||||
|
@ -644,8 +644,8 @@ func (conn *Connection) GetImageAttributes(
|
|||||||
snapSource bool) (*ImageAttributes, error) {
|
snapSource bool) (*ImageAttributes, error) {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
imageAttributes *ImageAttributes = &ImageAttributes{}
|
imageAttributes = &ImageAttributes{}
|
||||||
cj = conn.config
|
cj = conn.config
|
||||||
)
|
)
|
||||||
|
|
||||||
if snapSource && cj.cephSnapSourceKey == "" {
|
if snapSource && cj.cephSnapSourceKey == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user