mirror of
https://github.com/labstack/echo.git
synced 2025-12-03 22:59:09 +02:00
Replace "io/ioutil"
"io/ioutil" pakcage has been deprecated since Go 1.16.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
@@ -142,7 +142,7 @@ func TestRewriteWithConfigPreMiddleware_Issue1143(t *testing.T) {
|
||||
assert.Equal(t, http.StatusOK, rec.Code)
|
||||
|
||||
defer rec.Result().Body.Close()
|
||||
bodyBytes, _ := ioutil.ReadAll(rec.Result().Body)
|
||||
bodyBytes, _ := io.ReadAll(rec.Result().Body)
|
||||
assert.Equal(t, "hosts", string(bodyBytes))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user