mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 14:53:25 +00:00
chore: remove refs to deprecated io/ioutil
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user