Skip to content

Commit b342149

Browse files
committed
linter fixes
Signed-off-by: Ambika Nair <[email protected]>
1 parent 32f2ccc commit b342149

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

controllers/ibmobjectcsi_controller.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ func (r *IBMObjectCSIReconciler) getClusterRoleBindings(instance *crutils.IBMObj
545545
}
546546

547547
func (r *IBMObjectCSIReconciler) getStorageClasses(instance *crutils.IBMObjectCSI) []*storagev1.StorageClass {
548-
549548
cosRegion := r.ControllerHelper.GetRegion()
550549
cosEP := r.ControllerHelper.GetCosEP()
551550
s3Provider := r.ControllerHelper.GetS3Provider()
@@ -566,7 +565,6 @@ func (r *IBMObjectCSIReconciler) getStorageClasses(instance *crutils.IBMObjectCS
566565
// ibmCosSC := fmt.Sprintf("%s-%s", cosRegion, sc)
567566
// cosSCs = append(cosSCs, ibmCosSC)
568567
// }
569-
570568
} else {
571569
cosSCs = append(cosSCs, "standard")
572570
}

controllers/internal/crutils/static_resource_generator.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ func (c *IBMObjectCSI) GenerateS3fsSC(storageClassNamePrefix string,
222222
region string, cosEndpoint string, cosStorageClass string) *storagev1.StorageClass {
223223
// TODO: TIER Based SC
224224
var storageClassName string
225-
var cosEP string = ""
226-
var cosSC string = "standard"
225+
var cosEP string
226+
var cosSC = "standard"
227227

228228
if len(cosEndpoint) > 0 {
229229
cosEP = cosEndpoint
@@ -240,7 +240,7 @@ func (c *IBMObjectCSI) GenerateS3fsSC(storageClassNamePrefix string,
240240
storageClassName = fmt.Sprintf("%s-%s-s3fs", storageClassNamePrefix, cosSC)
241241
}
242242

243-
if isIBMColud == true {
243+
if isIBMColud {
244244
ibmCosSC := fmt.Sprintf("%s-%s", region, cosSC)
245245
cosSC = ibmCosSC
246246
}
@@ -277,10 +277,9 @@ func (c *IBMObjectCSI) GenerateS3fsSC(storageClassNamePrefix string,
277277
func (c *IBMObjectCSI) GenerateRcloneSC(storageClassNamePrefix string,
278278
reclaimPolicy corev1.PersistentVolumeReclaimPolicy, isIBMColud bool,
279279
region string, cosEndpoint string, cosStorageClass string) *storagev1.StorageClass {
280-
281280
var storageClassName string
282-
var cosEP string = ""
283-
var cosSC string = "standard"
281+
var cosEP string
282+
var cosSC = "standard"
284283

285284
if len(cosEndpoint) > 0 {
286285
cosEP = cosEndpoint
@@ -297,7 +296,7 @@ func (c *IBMObjectCSI) GenerateRcloneSC(storageClassNamePrefix string,
297296
storageClassName = fmt.Sprintf("%s-%s-rclone", storageClassNamePrefix, cosSC)
298297
}
299298

300-
if isIBMColud == true {
299+
if isIBMColud {
301300
ibmCosSC := fmt.Sprintf("%s-%s", region, cosSC)
302301
cosSC = ibmCosSC
303302
}

0 commit comments

Comments
 (0)