diff --git a/internal/server/server.go b/internal/server/server.go index 68b0b6c..05109b1 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -19,9 +19,9 @@ func (conf ServerConf) GetLatestVersion() (str string) { return "N/A (请检查网络连接)" } defer func(Body io.ReadCloser) { - t := Body.Close().Error() - if t != "" { - str = t + err = Body.Close() + if err != nil { + str = err.Error() } }(res.Body) recvJson, err := ioutil.ReadAll(res.Body)