Skip to content

Commit d7a974a

Browse files
committed
fix linter issues
Signed-off-by: Mayank Sachan <[email protected]>
1 parent 78d6b1a commit d7a974a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pkg/mounter/utils/mounter_utils.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
)
2121

2222
var unmount = syscall.Unmount
23+
var commandWithCtx = exec.CommandContext
2324

2425
var ErrTimeoutWaitProcess = errors.New("timeout waiting for process to end")
2526

@@ -38,7 +39,7 @@ func (su *MounterOptsUtils) FuseMount(path string, comm string, args []string) e
3839
ctx, cancel := context.WithCancel(context.Background())
3940
defer cancel()
4041

41-
cmd := exec.CommandContext(ctx, comm, args...)
42+
cmd := commandWithCtx(ctx, comm, args...)
4243
err := cmd.Start()
4344
if err != nil {
4445
klog.Errorf("FuseMount: command start failed: mounter=%s, args=%v, error=%v", comm, args, err)
@@ -162,9 +163,9 @@ func isMountpoint(pathname string) (bool, error) {
162163
return false, nil
163164
}
164165

165-
func waitForMount(ctx context.Context, path string, initialDelaySeconds, timeout time.Duration) error {
166-
if initialDelaySeconds > 0 {
167-
time.Sleep(initialDelaySeconds)
166+
func waitForMount(ctx context.Context, path string, initialDelay, timeout time.Duration) error {
167+
if initialDelay > 0 {
168+
time.Sleep(initialDelay)
168169
}
169170
var elapsed time.Duration
170171
attempt := 1

0 commit comments

Comments
 (0)