chore: replace ioutil -> io

This commit is contained in:
henry.chen
2024-11-04 10:31:28 +08:00
parent 27bc610a31
commit 6e1965a764
8 changed files with 27 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ package tools
import (
"encoding/base64"
htmpl "html/template"
"io/ioutil"
"io"
"log"
"net/http"
"strings"
@@ -62,7 +62,7 @@ func GetAvatar(domain string) string {
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
data, err := io.ReadAll(resp.Body)
if err != nil {
log.Println(err)
return ""