build: 更新依赖

This commit is contained in:
Mmx233
2022-02-26 16:10:00 +08:00
parent 41e41c7ee9
commit 853923fe90
4 changed files with 8 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ var Checker checker
// NetOk 网络状况检查
func (a *checker) NetOk(transport *http.Transport) bool {
h, i, e := tool.HTTP.GetReader(&tool.GetRequest{
res, e := tool.HTTP.GetReader(&tool.GetRequest{
Url: "https://www.baidu.com/",
Redirect: false,
Transport: transport,
@@ -19,6 +19,6 @@ func (a *checker) NetOk(transport *http.Transport) bool {
if e != nil {
return false
}
_ = i.Close()
return h.Get("Location") == ""
_ = res.Body.Close()
return res.Header.Get("Location") == ""
}