人流量数据 发生错误不退出程序

This commit is contained in:
fish 2019-12-20 10:05:06 +08:00
parent acb337ed05
commit b7859e763e
1 changed files with 9 additions and 0 deletions

View File

@ -162,6 +162,15 @@ func check(err error) {
}
}
func checkErr(err error, exit bool) {
if err != nil {
log.Println(err)
if exit {
os.Exit(1)
}
}
}
func GetAllFile(pathname string) error {
log.Println("begin for folder ", pathname)
rd, err := ioutil.ReadDir(pathname)