Remove references to io/ioutil package
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
This commit is contained in:
@ -16,7 +16,7 @@ package ip
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
current "github.com/containernetworking/cni/pkg/types/100"
|
||||
)
|
||||
@ -53,10 +53,10 @@ func EnableForward(ips []*current.IPConfig) error {
|
||||
}
|
||||
|
||||
func echo1(f string) error {
|
||||
if content, err := ioutil.ReadFile(f); err == nil {
|
||||
if content, err := os.ReadFile(f); err == nil {
|
||||
if bytes.Equal(bytes.TrimSpace(content), []byte("1")) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return ioutil.WriteFile(f, []byte("1"), 0644)
|
||||
return os.WriteFile(f, []byte("1"), 0644)
|
||||
}
|
||||
|
Reference in New Issue
Block a user