@@ -46,20 +46,17 @@ func NewResizeFs(mounter *mount.SafeFormatAndMount) *resizeFs {
46
46
func (resizefs * resizeFs ) Resize (devicePath string , deviceMountPath string ) (bool , error ) {
47
47
switch resizefs .mounter .Interface .(type ) {
48
48
case * mounter.CSIProxyMounterV1 :
49
- return resizefs .ResizeV1 (devicePath , deviceMountPath )
49
+ return resizefs .resizeV1 (devicePath , deviceMountPath )
50
50
case * mounter.CSIProxyMounterV1Beta :
51
- return resizefs .ResizeV1Beta (devicePath , deviceMountPath )
51
+ return resizefs .resizeV1Beta (devicePath , deviceMountPath )
52
52
}
53
53
return false , fmt .Errorf ("resize.mounter.Interface is not valid" )
54
54
}
55
55
56
- func (resizefs * resizeFs ) ResizeV1 (devicePath string , deviceMountPath string ) (bool , error ) {
56
+ func (resizefs * resizeFs ) resizeV1 (devicePath string , deviceMountPath string ) (bool , error ) {
57
57
klog .V (3 ).Infof ("resizeFS.Resize - Expanding mounted volume %s" , deviceMountPath )
58
58
59
- proxy , ok := resizefs .mounter .Interface .(* mounter.CSIProxyMounterV1 )
60
- if ! ok {
61
- return false , fmt .Errorf ("could not cast to csi proxy class" )
62
- }
59
+ proxy := resizefs .mounter .Interface .(* mounter.CSIProxyMounterV1 )
63
60
64
61
idRequest := & volumeapiv1.VolumeIDFromMountRequest {
65
62
Mount : deviceMountPath ,
@@ -81,13 +78,10 @@ func (resizefs *resizeFs) ResizeV1(devicePath string, deviceMountPath string) (b
81
78
}
82
79
83
80
// resize perform resize of file system
84
- func (resizefs * resizeFs ) ResizeV1Beta (devicePath string , deviceMountPath string ) (bool , error ) {
81
+ func (resizefs * resizeFs ) resizeV1Beta (devicePath string , deviceMountPath string ) (bool , error ) {
85
82
klog .V (3 ).Infof ("resizeFS.Resize - Expanding mounted volume %s" , deviceMountPath )
86
83
87
- proxy , ok := resizefs .mounter .Interface .(* mounter.CSIProxyMounterV1Beta )
88
- if ! ok {
89
- return false , fmt .Errorf ("could not cast to csi proxy class" )
90
- }
84
+ proxy := resizefs .mounter .Interface .(* mounter.CSIProxyMounterV1Beta )
91
85
92
86
idRequest := & volumeapiv1beta1.VolumeIDFromMountRequest {
93
87
Mount : deviceMountPath ,
0 commit comments