Skip to content

Commit e9bd6da

Browse files
committed
source formatting
1 parent 764b18e commit e9bd6da

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

netshare/drivers/nfs.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (n nfsDriver) Mount(r volume.MountRequest) volume.Response {
7676
}
7777

7878
n.mountm.Add(resolvedName, hostdir)
79-
79+
8080
if err := n.mountVolume(resolvedName, source, hostdir, n.version); err != nil {
8181
return volume.Response{Err: err.Error()}
8282
}
@@ -121,14 +121,14 @@ func (n nfsDriver) Unmount(r volume.UnmountRequest) volume.Response {
121121

122122
n.mountm.DeleteIfNotManaged(resolvedName)
123123

124-
// Check if directory is empty. This command will return "err" if empty
125-
if err := run(fmt.Sprintf("ls -1 %s | grep .", hostdir)); err == nil {
126-
log.Warnf("Directory %s not empty after unmount. Skipping RemoveAll call.", hostdir)
127-
} else {
128-
if err := os.RemoveAll(hostdir); err != nil {
129-
return volume.Response{Err: err.Error()}
124+
// Check if directory is empty. This command will return "err" if empty
125+
if err := run(fmt.Sprintf("ls -1 %s | grep .", hostdir)); err == nil {
126+
log.Warnf("Directory %s not empty after unmount. Skipping RemoveAll call.", hostdir)
127+
} else {
128+
if err := os.RemoveAll(hostdir); err != nil {
129+
return volume.Response{Err: err.Error()}
130130
}
131-
}
131+
}
132132

133133
return volume.Response{}
134134
}

netshare/netshare.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package netshare
22

33
import (
44
"fmt"
5-
"os"
6-
"path/filepath"
7-
"strconv"
85
"github.com/ContainX/docker-volume-netshare/netshare/drivers"
96
log "github.com/Sirupsen/logrus"
107
"github.com/docker/go-plugins-helpers/volume"
118
"github.com/spf13/cobra"
9+
"os"
10+
"path/filepath"
11+
"strconv"
1212
"syscall"
1313
)
1414

0 commit comments

Comments
 (0)