diff --git a/ffs/create.go b/ffs/create.go index e8636fc..9772581 100644 --- a/ffs/create.go +++ b/ffs/create.go @@ -72,7 +72,7 @@ func CreateNestedDir(dirPath string) string { return fullPath } -// CreateFilePathInHome creates a filepath and returns the path +// CreateFilePathInHome creates a filepath and returns the path. func CreateFilePathInHome(dirPath string) string { homeDir, err := os.UserHomeDir() gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) diff --git a/tests/run.go b/tests/run.go index e481a8a..9de1769 100644 --- a/tests/run.go +++ b/tests/run.go @@ -441,7 +441,7 @@ func Run(o *RunOption) { }) ginkgo.It("should set the bind mount as readonly with --mount =/src,=/target,ro", func() { - var err error = nil + var err error file := ffs.CreateTempFile("bar.txt", "foo") fileDir := filepath.Dir(file) ginkgo.DeferCleanup(os.RemoveAll, fileDir) @@ -724,10 +724,9 @@ func verifyMountsInfo(actual []MountJSON, want []MountJSON) { } func getWslPath(winPath string) (string, error) { - var path = filepath.Clean(winPath) var err error - path, err = filepath.Abs(winPath) + path, err := filepath.Abs(filepath.Clean(winPath)) if err != nil { return "", err }