From 11edc09681232191cec70b9b9ce0835af4082e04 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 22 Oct 2022 21:34:53 +0800 Subject: refactor: replace `ioutil.ReadAll` with `io.ReadAll` (#7200) --- internal/db/webhook.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/db') diff --git a/internal/db/webhook.go b/internal/db/webhook.go index 3e816061..c26cb5b4 100644 --- a/internal/db/webhook.go +++ b/internal/db/webhook.go @@ -10,7 +10,7 @@ import ( "crypto/tls" "encoding/hex" "fmt" - "io/ioutil" + "io" "net/url" "strings" "time" @@ -775,7 +775,7 @@ func (t *HookTask) deliver() { t.ResponseInfo.Headers[k] = strings.Join(vals, ",") } - p, err := ioutil.ReadAll(resp.Body) + p, err := io.ReadAll(resp.Body) if err != nil { t.ResponseInfo.Body = fmt.Sprintf("read body: %s", err) return -- cgit v1.2.3