print newline when panicking
This commit is contained in:
parent
bb9a12ef13
commit
4e54219efb
6
main.go
6
main.go
@ -45,7 +45,7 @@ func main() {
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(dataPath, 0755); err != nil {
|
||||
log.Panicf("Failed to create datapath, path: %s, err: %s", dataPath, err)
|
||||
log.Panicf("Failed to create datapath, path: %s, err: %s\n", dataPath, err)
|
||||
}
|
||||
return dataPath
|
||||
}()
|
||||
@ -67,7 +67,7 @@ func main() {
|
||||
|
||||
var chats sync.Map
|
||||
if err := loadData(dataPath, &chats); err != nil {
|
||||
log.Panicf("failed to load data, err: %s", err)
|
||||
log.Panicf("failed to load data, err: %s\n", err)
|
||||
}
|
||||
botPath := fmt.Sprintf("/bot%s", apiToken)
|
||||
http.HandleFunc(botPath, func(w http.ResponseWriter, r *http.Request) {
|
||||
@ -131,7 +131,7 @@ func main() {
|
||||
|
||||
}
|
||||
})
|
||||
log.Panic(http.ListenAndServe(fmt.Sprintf(":%v", port), nil))
|
||||
log.Panicln(http.ListenAndServe(fmt.Sprintf(":%v", port), nil))
|
||||
}
|
||||
|
||||
func handleTextAdded(gl *glist.GList, text string) {
|
||||
|
Loading…
Reference in New Issue
Block a user