From eaf8b1941d52f16c2ad2d705778d1b9c434cdf28 Mon Sep 17 00:00:00 2001 From: Holger Obermaier <40787752+ho-ob@users.noreply.github.com> Date: Mon, 15 Aug 2022 15:25:20 +0200 Subject: [PATCH] ioutils is depreceated --- receivers/httpReceiver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/receivers/httpReceiver.go b/receivers/httpReceiver.go index e66ad5e..974bcd6 100644 --- a/receivers/httpReceiver.go +++ b/receivers/httpReceiver.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" "strings" "sync" @@ -84,7 +84,7 @@ func (r *HttpReceiver) ServerHttp(w http.ResponseWriter, req *http.Request) { return } - body, err := ioutil.ReadAll(req.Body) + body, err := io.ReadAll(req.Body) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return