🔥 drop ioutil

This commit is contained in:
源文雨
2022-03-11 11:32:13 +08:00
parent 81d6a06dbe
commit edd9feb8f8
16 changed files with 95 additions and 253 deletions

View File

@@ -2,7 +2,7 @@
package model
import (
"io/ioutil"
"io"
"math/rand"
"net/http"
"os"
@@ -199,7 +199,7 @@ func (vdb *VtbDB) GetVtbList() (uidList []string) {
}
defer resp.Body.Close()
bytes, err := ioutil.ReadAll(resp.Body)
bytes, err := io.ReadAll(resp.Body)
if err != nil {
log.Errorln(err)
return
@@ -262,7 +262,7 @@ func (vdb *VtbDB) StoreVtb(uid string) {
}
defer resp.Body.Close()
bytes, err := ioutil.ReadAll(resp.Body)
bytes, err := io.ReadAll(resp.Body)
if err != nil {
log.Errorln(err)
return