1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-24 22:26:54 +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

@ -4,7 +4,6 @@ package bytes
import (
"fmt"
"io"
"io/ioutil"
"go-micro.dev/v4/codec"
)
@ -24,7 +23,7 @@ func (c *Codec) ReadHeader(m *codec.Message, t codec.MessageType) error {
func (c *Codec) ReadBody(b interface{}) error {
// read bytes
buf, err := ioutil.ReadAll(c.Conn)
buf, err := io.ReadAll(c.Conn)
if err != nil {
return err
}