取消协程支持

This commit is contained in:
liyp 2024-04-03 22:02:08 +08:00
parent cd5f9707bc
commit 2ddba3c31f
2 changed files with 9 additions and 9 deletions

16
main.go
View file

@ -36,14 +36,14 @@ func handlePost(w http.ResponseWriter, r *http.Request) {
func main() { func main() {
APIURL := config.GlobalConfig.Server.APIURL APIURL := config.GlobalConfig.Server.APIURL
PORT := config.GlobalConfig.Server.Port // PORT := config.GlobalConfig.Server.Port
fmt.Println(APIURL) // fmt.Println(APIURL)
fmt.Println(PORT) // fmt.Println(PORT)
// http.HandleFunc("/", handlePost) http.HandleFunc("/", handlePost)
// // 协程支持 // 协程支持
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { // http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
go handlePost(w, r) // go handlePost(w, r)
}) // })
fmt.Println("Server listening on port 5580...") fmt.Println("Server listening on port 5580...")
// APIURL 为 go-cqhttp 配置的事件上报地址 // APIURL 为 go-cqhttp 配置的事件上报地址

View file

@ -112,7 +112,7 @@ func (a *Pkg) GetMsg() string {
msg += "描述:" + result["pkgdesc"].(string) + "\n" msg += "描述:" + result["pkgdesc"].(string) + "\n"
msg += "打包:" + result["packager"].(string) + "\n" msg += "打包:" + result["packager"].(string) + "\n"
msg += "链接:" + result["url"].(string) + "\n" msg += "链接:" + result["url"].(string) + "\n"
msg += "更新日期:" + result["last_update"].(string) + "\n" msg += "更新日期:" + result["last_update"].(string)
return msg return msg