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

@ -26,7 +26,6 @@ import (
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"net"
@ -166,7 +165,7 @@ func sendFcgi(reqType int, fcgiParams map[string]string, data []byte, posts map[
}
defer resp.Body.Close()
content, _ = ioutil.ReadAll(resp.Body)
content, _ = io.ReadAll(resp.Body)
log.Println("c: send data length ≈", length, string(content))
fcgi.Close()