Move from deprecated ioutil to os and io packages (#4364)

This commit is contained in:
KallyDev
2021-09-30 01:17:48 +08:00
committed by GitHub
parent 059fc32f00
commit c48fadc4a7
26 changed files with 71 additions and 84 deletions

View File

@ -30,7 +30,6 @@ import (
"encoding/binary"
"errors"
"io"
"io/ioutil"
"mime/multipart"
"net"
"net/http"
@ -445,7 +444,7 @@ func (c *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Res
if chunked(resp.TransferEncoding) {
resp.Body = clientCloser{c, httputil.NewChunkedReader(rb)}
} else {
resp.Body = clientCloser{c, ioutil.NopCloser(rb)}
resp.Body = clientCloser{c, io.NopCloser(rb)}
}
return
}