调整ioutil为go1.16推荐语法 (#1209)

* perf:根据go1.16后的提议修改包使用

* perf:根据go1.16后的提议修改包使用以及修改中间件的代码冗余
This commit is contained in:
XiaoK29
2022-08-29 15:40:40 +08:00
committed by GitHub
parent ed9ca764d4
commit 091b61bd10
9 changed files with 32 additions and 34 deletions

View File

@@ -45,6 +45,7 @@ func LoadPlugin(path string) error {
return err
}
if fileInfo.IsDir() {
// TODO 返回的参数不一样暂时不修改(https://golang.google.cn/doc/go1.16#ioutil)
fileSlice, err := ioutil.ReadDir(path)
if err != nil {
return err