Skip to content

Commit 6a4dfa4

Browse files
committed
Fix error formatting in snapshot controller.
Signed-off-by: Humble Chirammal <[email protected]>
1 parent 9708a1b commit 6a4dfa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/snapshot_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ func (ctrl *csiSnapshotController) getStorageClassFromVolumeSnapshot(snapshot *c
864864
storageclassName = volume.Spec.StorageClassName
865865
}
866866
if len(storageclassName) == 0 {
867-
return nil, fmt.Errorf("cannot figure out the snapshot class automatically, please specify one in snapshot spec.")
867+
return nil, fmt.Errorf("cannot figure out the snapshot class automatically, please specify one in snapshot spec")
868868
}
869869
storageclass, err := ctrl.client.StorageV1().StorageClasses().Get(*pvc.Spec.StorageClassName, metav1.GetOptions{})
870870
if err != nil {
@@ -934,7 +934,7 @@ func (ctrl *csiSnapshotController) SetDefaultSnapshotClass(snapshot *crdv1.Volum
934934
// getClaimFromVolumeSnapshot is a helper function to get PVC from VolumeSnapshot.
935935
func (ctrl *csiSnapshotController) getClaimFromVolumeSnapshot(snapshot *crdv1.VolumeSnapshot) (*v1.PersistentVolumeClaim, error) {
936936
if snapshot.Spec.Source == nil {
937-
return nil, fmt.Errorf("the snapshot source is not specified.")
937+
return nil, fmt.Errorf("the snapshot source is not specified")
938938
}
939939
if snapshot.Spec.Source.Kind != pvcKind {
940940
return nil, fmt.Errorf("the snapshot source is not the right type. Expected %s, Got %v", pvcKind, snapshot.Spec.Source.Kind)

0 commit comments

Comments
 (0)