From e10527c3d2f61b2eeeb5898d348cd3413a4a1ffe Mon Sep 17 00:00:00 2001 From: xing Date: Fri, 14 Apr 2023 14:43:32 +0800 Subject: [PATCH] close body --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index fabcfb5..96442f1 100644 --- a/main.go +++ b/main.go @@ -23,6 +23,7 @@ func fetch(u string, fn ...func(s string) string) string { if err != nil { return "" } + defer res.Body.Close() html := string(s) for _, f := range fn { html = f(html)