Skip to content

Commit 05787e9

Browse files
committed
chore: error handle
1 parent 5ea7933 commit 05787e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"flag"
5+
"log"
56

67
"code-in-gym/task_bot/config"
78
"code-in-gym/task_bot/notify/email"
@@ -40,7 +41,10 @@ func main() {
4041
for k, v := range config.Task {
4142
t := task.NewDailyTask(k, v)
4243
index := t.Random()
43-
e.NotifyFunc(k, t.Detail(index))
44+
err := e.NotifyFunc(k, t.Detail(index))
45+
if err != nil {
46+
log.Println("Notify error:", err)
47+
}
4448
}
4549
}
4650
}

0 commit comments

Comments
 (0)