Skip to content

Commit

Permalink
stop using apis introduced in go1.16
Browse files Browse the repository at this point in the history
Change-Id: If1050f482fd269d9e7d9dc34f0a2a3598be9f543
  • Loading branch information
zeebo committed Mar 23, 2021
1 parent 0816f17 commit 5e67154
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drpcmux/serve_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"net/textproto"
"reflect"
Expand Down Expand Up @@ -82,7 +83,7 @@ func (m *Mux) serveHTTP(ctx context.Context, rpc string, body io.Reader) ([]byte
}

const maxSize = 4 << 20
bodyData, err := io.ReadAll(io.LimitReader(body, maxSize))
bodyData, err := ioutil.ReadAll(io.LimitReader(body, maxSize))
if err != nil {
return nil, err
} else if len(bodyData) >= maxSize {
Expand Down

0 comments on commit 5e67154

Please sign in to comment.