runtime: Update deprecate package

- Switch io/ioutil to os

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2022-11-24 09:32:38 +00:00
parent c11f7733c8
commit bd153436dc

View File

@@ -10,7 +10,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
@@ -2139,7 +2138,7 @@ func (k *kataAgent) copyFile(ctx context.Context, src, dst string) error {
case unix.S_IFREG: case unix.S_IFREG:
var err error var err error
// TODO: Support incrementail file copying instead of loading whole file into memory // TODO: Support incrementail file copying instead of loading whole file into memory
b, err = ioutil.ReadFile(src) b, err = os.ReadFile(src)
if err != nil { if err != nil {
return fmt.Errorf("Could not read file %s: %v", src, err) return fmt.Errorf("Could not read file %s: %v", src, err)
} }