1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-06 17:30:20 +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

@@ -4,7 +4,6 @@ import (
"context"
"crypto/rsa"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
@@ -209,7 +208,7 @@ func DeployAdminConfig(ctx context.Context, kubeConfig, localConfigPath string)
}
logrus.Debugf("Deploying admin Kubeconfig locally at [%s]", localConfigPath)
logrus.Tracef("Deploying admin Kubeconfig locally: %s", kubeConfig)
err := ioutil.WriteFile(localConfigPath, []byte(kubeConfig), 0600)
err := os.WriteFile(localConfigPath, []byte(kubeConfig), 0600)
if err != nil {
return fmt.Errorf("Failed to create local admin kubeconfig file: %v", err)
}