From 4bdb65fe309072bcb4b9362bc03b5f14fd1a4f22 Mon Sep 17 00:00:00 2001 From: Haroon-Dweikat-Ntx Date: Mon, 16 Dec 2024 16:27:54 +0200 Subject: [PATCH] lint fix --- .../services/prismv2/resource_nutanix_backup_target_v2.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go b/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go index 860530eb..eed9105b 100644 --- a/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go +++ b/nutanix/services/prismv2/resource_nutanix_backup_target_v2.go @@ -305,7 +305,7 @@ func ResourceNutanixBackupTargetV2Update(ctx context.Context, d *schema.Resource clusterConfigBody.Config = clusterRef - err := oneOfBackupTargetLocation.SetValue(*clusterConfigBody) + err = oneOfBackupTargetLocation.SetValue(*clusterConfigBody) if err != nil { return diag.Errorf("error while setting cluster location : %v", err) } @@ -319,7 +319,7 @@ func ResourceNutanixBackupTargetV2Update(ctx context.Context, d *schema.Resource objectStoreLocationBody.ProviderConfig = expandProviderConfig(providerConfig) objectStoreLocationBody.BackupPolicy = expandBackupPolicy(backupPolicy) - err := oneOfBackupTargetLocation.SetValue(*objectStoreLocationBody) + err = oneOfBackupTargetLocation.SetValue(*objectStoreLocationBody) if err != nil { return diag.Errorf("error while setting object store location : %v", err) } @@ -417,7 +417,7 @@ func ResourceNutanixBackupTargetV2Delete(ctx context.Context, d *schema.Resource } func expandProviderConfig(providerConfig interface{}) *management.AWSS3Config { - if providerConfig == nil || len(providerConfig.([]interface{})) == 0 { + if len(providerConfig.([]interface{})) == 0 { return nil } providerConfigI := providerConfig.([]interface{}) @@ -451,7 +451,7 @@ func expandAccessKeyCredentials(credentials interface{}) *management.AccessKeyCr } func expandBackupPolicy(policy interface{}) *management.BackupPolicy { - if policy == nil || len(policy.([]interface{})) == 0 { + if len(policy.([]interface{})) == 0 { return nil }