use package io since io/ioutil has been deprecated

This commit is contained in:
lyx0 2022-08-07 16:13:00 +02:00
parent 723d4ed9a5
commit ed8d09eae2

View file

@ -4,7 +4,7 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io"
"log" "log"
"net/http" "net/http"
@ -58,7 +58,7 @@ func checkMessage(text string) (bool, string) {
defer resp.Body.Close() defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) body, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
log.Panic(err) log.Panic(err)
} }