Remove ioutil usage

This has been deprecated in Go for some time, in favour of the
io package.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2023-08-22 18:29:28 +01:00
parent 55776acc0d
commit 2a88b5d2f7
8 changed files with 21 additions and 20 deletions

View File

@ -5,7 +5,7 @@ package handlers
import (
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"net/url"
@ -27,7 +27,7 @@ func MakeQueuedProxy(metrics metrics.MetricOptions, queuer ftypes.RequestQueuer,
defer r.Body.Close()
var err error
body, err = ioutil.ReadAll(r.Body)
body, err = io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return