Update to new cadvisor v0.48.1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2023-10-31 07:51:09 -04:00
parent 0294521985
commit 8b9fc325e2
36 changed files with 425 additions and 331 deletions

View File

@@ -17,7 +17,7 @@ package machine
import (
"bytes"
"flag"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
@@ -45,7 +45,7 @@ func getInfoFromFiles(filePaths string) string {
return ""
}
for _, file := range strings.Split(filePaths, ",") {
id, err := ioutil.ReadFile(file)
id, err := os.ReadFile(file)
if err == nil {
return strings.TrimSpace(string(id))
}
@@ -60,7 +60,7 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach
rootFs = "/rootfs"
}
cpuinfo, err := ioutil.ReadFile(filepath.Join(rootFs, "/proc/cpuinfo"))
cpuinfo, err := os.ReadFile(filepath.Join(rootFs, "/proc/cpuinfo"))
if err != nil {
return nil, err
}