Skip to content

Commit 4a31476

Browse files
committed
make some methods private
1 parent 117489a commit 4a31476

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Diff for: pkg/resizefs/resizefs_windows.go

+6-12
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,17 @@ func NewResizeFs(mounter *mount.SafeFormatAndMount) *resizeFs {
4646
func (resizefs *resizeFs) Resize(devicePath string, deviceMountPath string) (bool, error) {
4747
switch resizefs.mounter.Interface.(type) {
4848
case *mounter.CSIProxyMounterV1:
49-
return resizefs.ResizeV1(devicePath, deviceMountPath)
49+
return resizefs.resizeV1(devicePath, deviceMountPath)
5050
case *mounter.CSIProxyMounterV1Beta:
51-
return resizefs.ResizeV1Beta(devicePath, deviceMountPath)
51+
return resizefs.resizeV1Beta(devicePath, deviceMountPath)
5252
}
5353
return false, fmt.Errorf("resize.mounter.Interface is not valid")
5454
}
5555

56-
func (resizefs *resizeFs) ResizeV1(devicePath string, deviceMountPath string) (bool, error) {
56+
func (resizefs *resizeFs) resizeV1(devicePath string, deviceMountPath string) (bool, error) {
5757
klog.V(3).Infof("resizeFS.Resize - Expanding mounted volume %s", deviceMountPath)
5858

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)
6360

6461
idRequest := &volumeapiv1.VolumeIDFromMountRequest{
6562
Mount: deviceMountPath,
@@ -81,13 +78,10 @@ func (resizefs *resizeFs) ResizeV1(devicePath string, deviceMountPath string) (b
8178
}
8279

8380
// 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) {
8582
klog.V(3).Infof("resizeFS.Resize - Expanding mounted volume %s", deviceMountPath)
8683

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)
9185

9286
idRequest := &volumeapiv1beta1.VolumeIDFromMountRequest{
9387
Mount: deviceMountPath,

0 commit comments

Comments
 (0)