replace deprecated method

This commit is contained in:
Charles Xu
2023-09-18 10:16:48 +00:00
parent 03721e8c7e
commit 7833ca8bc6
11 changed files with 19 additions and 22 deletions

View File

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/base64"
"errors"
"io/ioutil"
"io"
"net"
"net/http"
"strings"
@ -164,7 +164,7 @@ func (l *dnsListener) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
buf, err = ioutil.ReadAll(r.Body)
buf, err = io.ReadAll(r.Body)
if err != nil {
l.logger.Error(err)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)