调整ioutil为go1.16推荐语法 (#1209)
* perf:根据go1.16后的提议修改包使用 * perf:根据go1.16后的提议修改包使用以及修改中间件的代码冗余
This commit is contained in:
@@ -2,7 +2,7 @@ package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"strconv"
|
||||
|
||||
@@ -48,7 +48,7 @@ func (b *FileUploadAndDownloadApi) BreakpointContinue(c *gin.Context) {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}(f)
|
||||
cen, _ := ioutil.ReadAll(f)
|
||||
cen, _ := io.ReadAll(f)
|
||||
if !utils.CheckMd5(cen, chunkMd5) {
|
||||
global.GVA_LOG.Error("检查md5失败!", zap.Error(err))
|
||||
response.FailWithMessage("检查md5失败", c)
|
||||
|
Reference in New Issue
Block a user