mirror of
https://github.com/labstack/echo.git
synced 2025-11-27 22:38:25 +02:00
Replace "io/ioutil"
"io/ioutil" pakcage has been deprecated since Go 1.16.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package echo
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -32,7 +32,7 @@ func TestGroupFile(t *testing.T) {
|
||||
e := New()
|
||||
g := e.Group("/group")
|
||||
g.File("/walle", "_fixture/images/walle.png")
|
||||
expectedData, err := ioutil.ReadFile("_fixture/images/walle.png")
|
||||
expectedData, err := os.ReadFile("_fixture/images/walle.png")
|
||||
assert.Nil(t, err)
|
||||
req := httptest.NewRequest(http.MethodGet, "/group/walle", nil)
|
||||
rec := httptest.NewRecorder()
|
||||
|
||||
Reference in New Issue
Block a user