Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hack/verify-boilerplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package main
import (
"errors"
"fmt"
"io/ioutil"
"os"
"regexp"
"strings"
Expand Down Expand Up @@ -146,7 +145,7 @@ func verifyFile(filePath string) error {
}

// read the file
b, err := ioutil.ReadFile(filePath)
b, err := os.ReadFile(filePath)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions validators/cgroup_validator_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"bufio"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -196,7 +195,7 @@ func (c *CgroupsValidator) getCgroupV2Subsystems(unifiedMountpoint string) ([]st
if freezeSupported {
subsystems = append(subsystems, "freezer")
}
data, err := ioutil.ReadFile(filepath.Join(unifiedMountpoint, "cgroup.controllers"))
data, err := os.ReadFile(filepath.Join(unifiedMountpoint, "cgroup.controllers"))
if err != nil {
return nil, err, warn
}
Expand Down
3 changes: 1 addition & 2 deletions validators/kernel_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -198,7 +197,7 @@ func (k *KernelValidator) getKernelConfigReader() (io.Reader, error) {
}
// Buffer the whole file, so that we can close the file and unload
// kernel config module in this function.
b, err := ioutil.ReadFile(path)
b, err := os.ReadFile(path)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions validators/package_validator_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package system
import (
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"

Expand Down Expand Up @@ -171,7 +171,7 @@ func getKernelRelease() (string, error) {
// getOSDistro returns the OS distro of the local machine.
func getOSDistro() (string, error) {
f := "/etc/lsb-release"
b, err := ioutil.ReadFile(f)
b, err := os.ReadFile(f)
if err != nil {
return "", fmt.Errorf("failed to read %q: %w", f, err)
}
Expand Down