From 5e671546c60204d40e105e8ec95595eb03ffa277 Mon Sep 17 00:00:00 2001 From: Jeff Wendling Date: Tue, 23 Mar 2021 13:47:01 -0400 Subject: [PATCH] stop using apis introduced in go1.16 Change-Id: If1050f482fd269d9e7d9dc34f0a2a3598be9f543 --- drpcmux/serve_http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drpcmux/serve_http.go b/drpcmux/serve_http.go index 32947ec..d445d6b 100644 --- a/drpcmux/serve_http.go +++ b/drpcmux/serve_http.go @@ -7,6 +7,7 @@ import ( "context" "encoding/json" "io" + "io/ioutil" "net/http" "net/textproto" "reflect" @@ -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 {