From 55479c5869a77a46b3bd629a9e33484364c9937e Mon Sep 17 00:00:00 2001 From: liyp Date: Sat, 31 Aug 2024 21:21:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(workers):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=89=93=E5=8D=B0=E8=AF=AD=E5=8F=A5=E4=BB=A5?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workers/core.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workers/core.go b/workers/core.go index d8a825e..b05295c 100644 --- a/workers/core.go +++ b/workers/core.go @@ -172,9 +172,9 @@ func (s *StdAns) SendMsg(msg string) bool { url := cfg["POSTURL"].(string) + "/send_msg" // println("core:", url) // fmt.Println("请求地址:", url) - fmt.Println("响应信息:\n", msg) + // fmt.Println("响应信息:\n", msg) request := gorequest.New() - resp, body, errs := request.Post(url). + resp, _, errs := request.Post(url). Set("Content-Type", "application/json"). Send(string(requestBody)).End() if len(errs) > 0 { @@ -184,7 +184,7 @@ func (s *StdAns) SendMsg(msg string) bool { } defer resp.Body.Close() // res, _ := io.ReadAll(resp.Body) - fmt.Println("响应返回:", body) + // fmt.Println("响应返回:", body) return true } @@ -208,7 +208,7 @@ func (s *StdAns) GetImage(file string) string { fmt.Println("解析JSON失败:", err) return "" } - fmt.Println("url:", url) + // fmt.Println("url:", url) path, ok := data["data"].(map[string]interface{})["file"].(string) if !ok { return ""