From 4f4e3d288a38f2e8075818c05292d67fbcaffb89 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 7 Sep 2023 13:30:46 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- gateway/scaling/ranges.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gateway/scaling/ranges.go b/gateway/scaling/ranges.go index 209886d2..821f155a 100644 --- a/gateway/scaling/ranges.go +++ b/gateway/scaling/ranges.go @@ -4,7 +4,6 @@ import ( "bytes" "encoding/json" "io" - "io/ioutil" "net/http" "github.com/openfaas/faas-provider/types" @@ -66,7 +65,7 @@ func MakeHorizontalScalingHandler(next http.HandlerFunc) http.HandlerFunc { upstreamReq, _ := json.Marshal(scaleRequest) // Restore the io.ReadCloser to its original state - r.Body = ioutil.NopCloser(bytes.NewBuffer(upstreamReq)) + r.Body = io.NopCloser(bytes.NewBuffer(upstreamReq)) next.ServeHTTP(w, r) }