1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

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-31 02:24:40 +08:00
committed by GitHub
parent ed690ed838
commit 5d5aee1f08
36 changed files with 84 additions and 95 deletions

View File

@@ -3,7 +3,7 @@ package web
import (
"crypto/tls"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"
"os/signal"
@@ -80,7 +80,7 @@ func TestService(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)
}
@@ -276,7 +276,7 @@ func TestTLS(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)
}