chore: remove refs to deprecated io/ioutil (#70300)

This commit is contained in:
guangwu
2023-06-22 18:19:23 +08:00
committed by GitHub
parent b2f9a3a222
commit bbe4b0d3de
2 changed files with 3 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
@@ -129,7 +129,7 @@ func main() {
http.HandleFunc("/listen", func(w http.ResponseWriter, r *http.Request) {
log.Printf("got submission from: %s\n", r.RemoteAddr)
b, err := ioutil.ReadAll(r.Body)
b, err := io.ReadAll(r.Body)
if err != nil {
log.Println(err)
w.WriteHeader(http.StatusBadRequest)