perf: replace ioutil.ReadAll with io.ReadAll

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2025-05-28 14:34:42 +08:00
parent bfefcdb0bd
commit 16e0e4ed76

View File

@@ -2,7 +2,7 @@ package main
import (
"context"
"io/ioutil"
"io"
"net/http"
"strconv"
"strings"
@@ -78,7 +78,7 @@ func handleCmdReq(br *broker, c *gin.Context) {
return
}
content, err := ioutil.ReadAll(c.Request.Body)
content, err := io.ReadAll(c.Request.Body)
if err != nil {
c.Status(http.StatusBadRequest)
return