迁移并重构项目,优化了执行流程

This commit is contained in:
2025-10-31 15:43:25 +08:00
commit 35bcd62ad5
29 changed files with 1312 additions and 0 deletions

22
pkg/utils/request.go Normal file
View File

@ -0,0 +1,22 @@
package utils
import (
"crypto/tls"
"io"
"net/http"
)
func Request(method, urlStr string, body io.Reader, header http.Header) (*http.Response, error) {
req, _ := http.NewRequest(method, urlStr, body)
req.Header = header
client := http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
return resp, nil
}