Stop using deprecated ioutil package.

This commit is contained in:
Joachim Bauch
2022-04-05 12:48:27 +02:00
parent 9c2df744c1
commit 81a52389aa
12 changed files with 48 additions and 49 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
@@ -268,7 +267,7 @@ func (b *BackendServer) parseRequestBody(f func(http.ResponseWriter, *http.Reque
return
}
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
log.Println("Error reading body: ", err)
http.Error(w, "Could not read body", http.StatusBadRequest)