From 78743e302165c8bbfd67aa2db4c153d9728209da Mon Sep 17 00:00:00 2001 From: Vishwas Siravara Date: Sun, 24 Sep 2023 17:39:42 -0700 Subject: [PATCH] gofumpt run.go Signed-off-by: Vishwas Siravara --- ffs/create.go | 2 +- tests/run.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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 }