Clarify some comments

As suggested in code review

Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
This commit is contained in:
Sauyon Lee
2020-06-15 23:14:39 -07:00
parent 9bd1f87d66
commit e25b882e42

View File

@@ -47,7 +47,7 @@ func GetModDir(pkgpath string, modflag string) string {
}
if strings.TrimSpace(string(mod)) == "<nil>" {
// if modules aren't being used, return nothing
// if modules aren't being used, return the empty string
return ""
}
@@ -104,7 +104,7 @@ func GetPkgDir(pkgpath string, modflag string) string {
return abs
}
// FileExists tests whether the file at `filename` exists.
// FileExists tests whether the file at `filename` exists and is not a directory.
func FileExists(filename string) bool {
info, err := os.Stat(filename)
if err != nil && !os.IsNotExist(err) {