diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dc1d9182f..9ab6da60ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - Process light client finality updates only for new finalized epochs instead of doing it for every block. - Refactor subnets subscriptions. - Refactor RPC handlers subscriptions. +- Go deps upgrade, from `ioutil` to `io` ### Deprecated diff --git a/testing/middleware/engine-api-proxy/proxy.go b/testing/middleware/engine-api-proxy/proxy.go index 24c0576a06..f29602a3bd 100644 --- a/testing/middleware/engine-api-proxy/proxy.go +++ b/testing/middleware/engine-api-proxy/proxy.go @@ -9,7 +9,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net" "net/http" "strings" @@ -240,7 +239,7 @@ func (p *Proxy) sendHttpRequest(req *http.Request, requestBytes []byte) (*http.R } // Set the modified request as the proxy request body. - proxyReq.Body = ioutil.NopCloser(bytes.NewBuffer(requestBytes)) + proxyReq.Body = io.NopCloser(bytes.NewBuffer(requestBytes)) // Required proxy headers for forwarding JSON-RPC requests to the execution client. proxyReq.Header.Set("Host", req.Host) @@ -261,14 +260,14 @@ func (p *Proxy) sendHttpRequest(req *http.Request, requestBytes []byte) (*http.R // Peek into the bytes of an HTTP request's body. func parseRequestBytes(req *http.Request) ([]byte, error) { - requestBytes, err := ioutil.ReadAll(req.Body) + requestBytes, err := io.ReadAll(req.Body) if err != nil { return nil, err } if err = req.Body.Close(); err != nil { return nil, err } - req.Body = ioutil.NopCloser(bytes.NewBuffer(requestBytes)) + req.Body = io.NopCloser(bytes.NewBuffer(requestBytes)) return requestBytes, nil }