From 9c1cb4074fcdbc067ac45cfbc5c6cd73f35d508e Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Fri, 10 May 2024 14:26:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=BC=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../Language/Go/Basic/File/Gloang_文件操作.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) + } } ```