1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +00:00

Replace deprecated io/ioutil

Signed-off-by: Manuel Buil <mbuil@suse.com>
This commit is contained in:
Manuel Buil
2023-08-04 13:01:50 +02:00
parent d80fc55b60
commit f923a49d9d
15 changed files with 42 additions and 49 deletions

View File

@@ -8,7 +8,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"time"
@@ -311,7 +310,7 @@ func pullImage(ctx context.Context, dClient *client.Client, hostname string, con
if logrus.GetLevel() == logrus.TraceLevel {
io.Copy(os.Stdout, out)
} else {
io.Copy(ioutil.Discard, out)
io.Copy(io.Discard, out)
}
return nil
}
@@ -647,7 +646,7 @@ func ReadFileFromContainer(ctx context.Context, dClient *client.Client, hostname
if _, err := tarReader.Next(); err != nil {
return "", err
}
file, err := ioutil.ReadAll(tarReader)
file, err := io.ReadAll(tarReader)
if err != nil {
return "", err
}