From 0716a10400a1576e38012b8d0dfb2438c8ba67e7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 20 Sep 2019 22:05:18 +0200 Subject: [PATCH] Clean up utils package --- utils/fs.go | 2 +- utils/osdetail/test/{main.go => main_windows.go} | 0 utils/structure_test.go | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename utils/osdetail/test/{main.go => main_windows.go} (100%) diff --git a/utils/fs.go b/utils/fs.go index 89ee87d..6cc3b4a 100644 --- a/utils/fs.go +++ b/utils/fs.go @@ -8,7 +8,7 @@ import ( const isWindows = runtime.GOOS == "windows" -// EnsureDirectory ensures that the given directoy exists and that is has the given permissions set. +// EnsureDirectory ensures that the given directory exists and that is has the given permissions set. // If path is a file, it is deleted and a directory created. // If a directory is created, also all missing directories up to the required one are created with the given permissions. func EnsureDirectory(path string, perm os.FileMode) error { diff --git a/utils/osdetail/test/main.go b/utils/osdetail/test/main_windows.go similarity index 100% rename from utils/osdetail/test/main.go rename to utils/osdetail/test/main_windows.go diff --git a/utils/structure_test.go b/utils/structure_test.go index d0c3e5a..77fdc36 100644 --- a/utils/structure_test.go +++ b/utils/structure_test.go @@ -59,7 +59,7 @@ func ExampleDirStructure() { fmt.Println(err) } - filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error { + _ = filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error { if err == nil { dir := strings.TrimPrefix(path, basePath) if dir == "" {