Skip to content

Commit

Permalink
cleanup: pass volumeGroupSnapshotterBase by pointer
Browse files Browse the repository at this point in the history
This commit modifies code to pass volumeGroupSnapshotterBase
by pointer to address the following linter error.
```
hugeParam: v is heavy (80 bytes); consider passing it by pointer (gocritic)
func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
```

Signed-off-by: Rakshith R <[email protected]>
  • Loading branch information
Rakshith-R committed Dec 16, 2024
1 parent 8c99b2f commit c420bf5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/volumegroupsnapshot_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (v *volumeGroupSnapshotterBase) DeletePods(pods []*v1.Pod) error {
return nil
}

func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
func (v *volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
groupSnapshotClass *groupsnapapi.VolumeGroupSnapshotClass,
) error {
return wait.PollUntilContextTimeout(
Expand All @@ -288,7 +288,7 @@ func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshotClass(
})
}

func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
func (v *volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
volumeGroupSnapshotClassName string, labels map[string]string,
) (*groupsnapapi.VolumeGroupSnapshot, error) {
namespace := v.namespace
Expand Down Expand Up @@ -358,7 +358,7 @@ func (v volumeGroupSnapshotterBase) CreateVolumeGroupSnapshot(name,
return groupSnapshot, nil
}

func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapshotName string) error {
func (v *volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapshotName string) error {
namespace := v.namespace
ctx := context.TODO()
err := v.groupclient.VolumeGroupSnapshots(namespace).Delete(
Expand Down Expand Up @@ -397,7 +397,7 @@ func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshot(volumeGroupSnapsho
})
}

func (v volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshotClass(groupSnapshotClassName string) error {
func (v *volumeGroupSnapshotterBase) DeleteVolumeGroupSnapshotClass(groupSnapshotClassName string) error {
ctx := context.TODO()
err := v.groupclient.VolumeGroupSnapshotClasses().Delete(
ctx, groupSnapshotClassName, metav1.DeleteOptions{})
Expand Down

0 comments on commit c420bf5

Please sign in to comment.