Replace "io/ioutil"

"io/ioutil" pakcage has been deprecated since Go 1.16.
This commit is contained in:
zeek
2022-11-21 15:59:14 +02:00
committed by Martti T
parent be23ab67cc
commit 3c4d3b3083
12 changed files with 37 additions and 40 deletions
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"bytes"
"compress/gzip"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/labstack/echo/v4"
@@ -173,7 +173,7 @@ func TestGzipWithStatic(t *testing.T) {
r, err := gzip.NewReader(rec.Body)
if assert.NoError(t, err) {
defer r.Close()
want, err := ioutil.ReadFile("../_fixture/images/walle.png")
want, err := os.ReadFile("../_fixture/images/walle.png")
if assert.NoError(t, err) {
buf := new(bytes.Buffer)
buf.ReadFrom(r)