From c7ce482511ce51750382af3949a446fdbdbc1dc3 Mon Sep 17 00:00:00 2001 From: liyp Date: Mon, 15 Apr 2024 15:26:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?= 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 409000a..110af79 100644 --- a/workers/core.go +++ b/workers/core.go @@ -92,17 +92,17 @@ func (s *StdAns) SendMsg(msg string) bool { fmt.Println("Error marshaling JSON:", err) return false } - re, err := json.MarshalIndent(requestBody, "", " ") + _, err = json.MarshalIndent(requestBody, "", " ") if err != nil { fmt.Println("Error marshaling JSON:", err) return false } - fmt.Println(string(re)) + // fmt.Println(string(re)) url := config.GlobalConfig.Server.POSTURL // println("core:", url) - fmt.Println("请求地址:", url) - fmt.Println("响应信息:", msg) + // fmt.Println("请求地址:", url) + fmt.Println("响应信息:\n", msg) resp, err := http.Post(url, "application/json", bytes.NewBuffer(requestBody)) if err != nil { fmt.Println("Error sending request:", err)