style: update some code to fit go 1.19

This commit is contained in:
Li4n0
2022-09-14 01:05:24 +08:00
parent 4cd232f7e0
commit fe316220a1
8 changed files with 514 additions and 643 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package recycler
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"runtime"
log "unknwon.dev/clog/v2"
@@ -36,7 +36,7 @@ func stack(skip int) []byte {
// Print this much at least. If we can't find the source, it won't show.
_, _ = fmt.Fprintf(buf, "%s:%d (0x%x)\n", file, line, pc)
if file != lastFile {
data, err := ioutil.ReadFile(file)
data, err := os.ReadFile(file)
if err != nil {
continue
}