1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-27 06:10:26 +08:00

完善主程序

This commit is contained in:
fumiama
2021-12-28 21:50:10 +08:00
parent f0956ae742
commit 6ae8e88bd1
18 changed files with 499 additions and 14 deletions

15
helper/file.go Normal file
View File

@@ -0,0 +1,15 @@
package helper
import "os"
// IsExist 文件/路径存在
func IsExist(path string) bool {
_, err := os.Stat(path)
return err == nil || os.IsExist(err)
}
// IsNotExist 文件/路径不存在
func IsNotExist(path string) bool {
_, err := os.Stat(path)
return err != nil && os.IsNotExist(err)
}