diff --git a/Software/Development/Language/Go/Basic/File/Gloang_文件操作.md b/Software/Development/Language/Go/Basic/File/Gloang_文件操作.md index c732046..56a4415 100644 --- a/Software/Development/Language/Go/Basic/File/Gloang_文件操作.md +++ b/Software/Development/Language/Go/Basic/File/Gloang_文件操作.md @@ -42,13 +42,13 @@ func IsPathExist(path string) bool { ```go func isFileExist(filename string) bool { - info, e := os.Stat(filename) + info, e := os.Stat(filename) - if e == nil { - return !info.IsDir() - } else { - return os.IsExist(e) - } + if e == nil { + return !info.IsDir() + } else { + return os.IsExist(e) + } } ```