From 6445dad7d66fa6a1867090fcd9602c98863649f6 Mon Sep 17 00:00:00 2001 From: ebiggers Date: Sun, 8 Sep 2019 19:46:59 -0700 Subject: Fix various typos and grammatical errors (#141) These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore(). --- filesystem/path.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'filesystem/path.go') diff --git a/filesystem/path.go b/filesystem/path.go index d788a6b..5fd3fdf 100644 --- a/filesystem/path.go +++ b/filesystem/path.go @@ -30,8 +30,8 @@ import ( // We only check the unix permissions and the sticky bit const permMask = os.ModeSticky | os.ModePerm -// cannonicalizePath turns path into an absolute path without symlinks. -func cannonicalizePath(path string) (string, error) { +// canonicalizePath turns path into an absolute path without symlinks. +func canonicalizePath(path string) (string, error) { path, err := filepath.Abs(path) if err != nil { return "", err @@ -62,14 +62,14 @@ func isDir(path string) bool { return err == nil && info.IsDir() } -// isDevice returns true if the path exists and is that of a directory. +// isDevice returns true if the path exists and is that of a device. func isDevice(path string) bool { info, err := loggedStat(path) return err == nil && info.Mode()&os.ModeDevice != 0 } // isDirCheckPerm returns true if the path exists and is a directory. If the -// specified permissions and sticky bit of mode do not match the path, and error +// specified permissions and sticky bit of mode do not match the path, an error // is logged. func isDirCheckPerm(path string, mode os.FileMode) bool { info, err := loggedStat(path) -- cgit v1.2.3