1
0
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:
zeek
2022-11-21 21:29:43 +09:00
committed by Martti T
parent be23ab67cc
commit 3c4d3b3083
12 changed files with 37 additions and 40 deletions

View File

@@ -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))
}
}