人流量数据 发生错误不退出程序
This commit is contained in:
parent
acb337ed05
commit
b7859e763e
9
main.go
9
main.go
|
@ -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 {
|
func GetAllFile(pathname string) error {
|
||||||
log.Println("begin for folder ", pathname)
|
log.Println("begin for folder ", pathname)
|
||||||
rd, err := ioutil.ReadDir(pathname)
|
rd, err := ioutil.ReadDir(pathname)
|
||||||
|
|
Loading…
Reference in New Issue