mirror of
https://github.com/zhaojh329/rttys.git
synced 2026-02-27 09:53:21 +08:00
perf: replace ioutil.ReadAll with io.ReadAll
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user