Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chimanjain committed Aug 27, 2024
1 parent 832e000 commit 6f609ca
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
4 changes: 1 addition & 3 deletions api/v1/acc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
package v1

import (
"fmt"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -78,7 +76,7 @@ func (cr *ApexConnectivityClient) GetApexConnectivityClientStatus() *ApexConnect

// GetApexConnectivityClientName - Returns the Client
func (cr *ApexConnectivityClient) GetApexConnectivityClientName() string {
return fmt.Sprintf("%s", cr.Name)
return cr.Name
}

// GetApexConnectivityClientSpec - Returns a pointer to the GetApexConnectivityClientSpec instance
Expand Down
8 changes: 4 additions & 4 deletions pkg/modules/application_mobility.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func AppMobilityVelero(ctx context.Context, isDeleting bool, op utils.OperatorCo
return err
}

volumeSnapshotLoc, err := utils.GetVolumeSnapshotLocation(ctx, vsName, cr.Namespace, ctrlClient)
volumeSnapshotLoc, _ := utils.GetVolumeSnapshotLocation(ctx, vsName, cr.Namespace, ctrlClient)
if volumeSnapshotLoc != nil {
log.Infow("\n Volume Snapshot location Name : ", volumeSnapshotLoc.Name, " already exists and being re-used")
}
Expand All @@ -571,7 +571,7 @@ func AppMobilityVelero(ctx context.Context, isDeleting bool, op utils.OperatorCo
}

for _, ctrlObj := range ctrlObjects {
if isDeleting == false {
if !isDeleting {
if err := utils.ApplyObject(ctx, ctrlObj, ctrlClient); err != nil {
return err
}
Expand Down Expand Up @@ -794,7 +794,7 @@ func UseBackupStorageLoc(ctx context.Context, isDeleting bool, op utils.Operator
return err
}

backupStorageLoc, err := utils.GetBackupStorageLocation(ctx, bslName, cr.Namespace, ctrlClient)
backupStorageLoc, _ := utils.GetBackupStorageLocation(ctx, bslName, cr.Namespace, ctrlClient)
if backupStorageLoc != nil {
log.Infow("\n Backup Storage Name : ", backupStorageLoc.Name, "already exists and being re-used")
}
Expand All @@ -805,7 +805,7 @@ func UseBackupStorageLoc(ctx context.Context, isDeleting bool, op utils.Operator
}

for _, ctrlObj := range ctrlObjects {
if isDeleting == false {
if !isDeleting {
if err := utils.ApplyObject(ctx, ctrlObj, ctrlClient); err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ func ReplaceAllContainerImageApply(img K8sImagesConfig, c *acorev1.ContainerAppl
case string(csmv1.Resiliency):
*c.Image = img.Images.Podmon
}
return
}

// UpdateinitContainerApply -
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/clientgoclient/fakeDaemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *applyconfiguratio
return result, err
}

err = json.Unmarshal(data, result)
_ = json.Unmarshal(data, result)

_, err = c.Get(ctx, *daemonSet.Name, v1.GetOptions{})
if errors.IsNotFound(err) {
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/clientgoclient/fakeDeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (c *FakeDeployments) Apply(ctx context.Context, deployment *applyconfigurat
return result, err
}

err = json.Unmarshal(data, result)
_ = json.Unmarshal(data, result)

_, err = c.Get(ctx, *deployment.Name, v1.GetOptions{})
if errors.IsNotFound(err) {
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/clientgoclient/fakeStatefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (c *FakeStatefulsets) Apply(ctx context.Context, statefulset *applyconfigur
return result, err
}

err = json.Unmarshal(data, result)
_ = json.Unmarshal(data, result)

_, err = c.Get(ctx, *statefulset.Name, v1.GetOptions{})
if errors.IsNotFound(err) {
Expand Down

0 comments on commit 6f609ca

Please sign in to comment.