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
+2 -2
View File
@@ -27,7 +27,7 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
pseudorand "math/rand"
"net"
@@ -418,7 +418,7 @@ func (c *SignalingClient) SendMessages(clients []*SignalingClient) {
func registerAuthHandler(router *mux.Router) {
router.HandleFunc("/auth", func(w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
log.Println("Error reading body:", err)
return