chore: remove refs to deprecated io/ioutil

This commit is contained in:
guoguangwu
2023-06-21 12:12:27 +08:00
parent 339e243472
commit 6dc23ca804
15 changed files with 36 additions and 43 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ package systemlogmonitor
import (
"encoding/json"
"io/ioutil"
"os"
"time"
"github.com/golang/glog"
@@ -62,7 +62,7 @@ func NewLogMonitorOrDie(configPath string) types.Monitor {
tomb: tomb.NewTomb(),
}
f, err := ioutil.ReadFile(configPath)
f, err := os.ReadFile(configPath)
if err != nil {
glog.Fatalf("Failed to read configuration file %q: %v", configPath, err)
}