✏️ make lint happy

This commit is contained in:
fumiama
2021-12-24 12:32:51 +08:00
parent a3b5a226ac
commit 7c5d08b723
12 changed files with 43 additions and 34 deletions

View File

@@ -29,9 +29,9 @@ func DownloadTo(url, file string, chkcrt bool) error {
f, err = os.Create(file)
if err == nil {
_, err = io.Copy(f, resp.Body)
resp.Body.Close()
f.Close()
}
resp.Body.Close()
}
return err
}

View File

@@ -23,6 +23,7 @@ var (
lzmu sync.Mutex
)
// GetLazyData 获取懒加载数据
func GetLazyData(path string, isReturnDataBytes, isDataMustEqual bool) ([]byte, error) {
var data []byte
var resp *http.Response