mirror of
https://github.com/rancher/rke.git
synced 2025-09-02 23:44:32 +00:00
Replace deprecated io/ioutil
Signed-off-by: Manuel Buil <mbuil@suse.com>
This commit is contained in:
@@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -40,7 +40,7 @@ func resolveClusterFile(ctx *cli.Context) (string, string, error) {
|
||||
return "", "", fmt.Errorf("can not find cluster configuration file: %v", err)
|
||||
}
|
||||
defer file.Close()
|
||||
buf, err := ioutil.ReadAll(file)
|
||||
buf, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("failed to read file: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user