fix: 在 fetchSelf 函数中初始化 reply 变量以确保返回值的正确性
This commit is contained in:
parent
893c4ae887
commit
98c9073f0d
@ -95,6 +95,7 @@ func fetchSelf(msg model.Message) (reply *model.Reply) {
|
||||
log.Println("parseSystemInfo failed", err)
|
||||
return
|
||||
}
|
||||
reply = &model.Reply{}
|
||||
reply.FromMsg = msg
|
||||
reply.ReplyMsg = info.String()
|
||||
return
|
||||
|
@ -2,7 +2,6 @@ package util
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
@ -72,10 +71,7 @@ func DownloadFile(urlStr string, dirPath string) (filepath string, err error) {
|
||||
ReadTimeout: 30 * time.Second,
|
||||
WriteTimeout: 30 * time.Second,
|
||||
MaxConnWaitTimeout: 30 * time.Second,
|
||||
// TLSConfig: nil, // 使用默认配置
|
||||
TLSConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
},
|
||||
TLSConfig: nil,
|
||||
}
|
||||
|
||||
// 准备请求
|
||||
|
Loading…
x
Reference in New Issue
Block a user