replace ioutil with io and os (#2327)

set the go version to 1.16 in pr.yml and tests.yml, so as to be consistent with the version in go.mod.
This commit is contained in:
Benjamin
2021-10-30 19:24:40 +01:00
committed by GitHub
parent ed690ed838
commit 5d5aee1f08
36 changed files with 84 additions and 95 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import (
"fmt"
"go-micro.dev/v4/api/server"
"go-micro.dev/v4/api/server/cors"
"io/ioutil"
"io"
"net/http"
"testing"
)
@@ -28,7 +28,7 @@ func TestHTTPServer(t *testing.T) {
}
defer rsp.Body.Close()
b, err := ioutil.ReadAll(rsp.Body)
b, err := io.ReadAll(rsp.Body)
if err != nil {
t.Fatal(err)
}
@@ -73,7 +73,7 @@ func TestCORSHTTPServer(t *testing.T) {
}
defer rsp.Body.Close()
b, err := ioutil.ReadAll(rsp.Body)
b, err := io.ReadAll(rsp.Body)
if err != nil {
t.Fatal(err)
}