This commit is contained in:
fallen-angle
2022-01-20 16:49:37 +08:00
parent 2280679053
commit 582807ae10
13 changed files with 182 additions and 16 deletions

19
initialize/http_client.go Normal file
View File

@@ -0,0 +1,19 @@
package initialize
import (
"nCovTrack-Backend/global"
"net/http"
"time"
)
func initHttpClient() {
clientMap := make(map[string]*http.Client)
clientMap[""] = defaultClient()
global.HttpClient = clientMap
}
func defaultClient() *http.Client {
return &http.Client{
Timeout: time.Duration(5 * time.Second),
}
}