close body

This commit is contained in:
xing 2023-04-14 14:43:32 +08:00
parent 93fd4d4a2e
commit e10527c3d2

View File

@ -23,6 +23,7 @@ func fetch(u string, fn ...func(s string) string) string {
if err != nil { if err != nil {
return "" return ""
} }
defer res.Body.Close()
html := string(s) html := string(s)
for _, f := range fn { for _, f := range fn {
html = f(html) html = f(html)