Skip to content

Commit 4ef9deb

Browse files
author
Ariel Kass
committed
resolving nilnil and unparam issues
Signed-off-by: Ariel Kass <[email protected]>
1 parent 8f24f5b commit 4ef9deb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

controllers/volumereplication_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ func (r *VolumeReplicationReconciler) enableReplication(logger logr.Logger, repl
675675
// currently we provide Snapshot and PVC, the default case allows the provisioner to still create a volume
676676
// so that an external controller can act upon it. Additional DataSource types can be added here with
677677
// an appropriate implementation function.
678-
func (r *VolumeReplicationReconciler) getReplicationSource(kind string, volumeHandle string) (*replicationlib.ReplicationSource, error) {
678+
func (r *VolumeReplicationReconciler) getReplicationSource(kind string, volumeHandle string) *replicationlib.ReplicationSource {
679679
switch kind {
680680
case pvcDataSource:
681681
volumeSource := replicationlib.ReplicationSource_Volume{
@@ -687,7 +687,7 @@ func (r *VolumeReplicationReconciler) getReplicationSource(kind string, volumeHa
687687
Type: &volumeSource,
688688
}
689689

690-
return replicationSource, nil
690+
return replicationSource
691691

692692
case volumeGroupDataSource:
693693
volumeGroupSource := replicationlib.ReplicationSource_Volumegroup{
@@ -699,10 +699,10 @@ func (r *VolumeReplicationReconciler) getReplicationSource(kind string, volumeHa
699699
Type: &volumeGroupSource,
700700
}
701701

702-
return replicationSource, nil
702+
return replicationSource
703703
default:
704704
// For now we shouldn't pass other things to this function, but treat it as a noop and extend as needed
705-
return nil, nil
705+
return nil
706706
}
707707
}
708708

0 commit comments

Comments
 (0)