1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 14:36:32 +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

@@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"
"os/exec"
@@ -260,7 +260,7 @@ func (c *Cluster) deployAddonsInclude(ctx context.Context) error {
manifests = append(manifests, addonYAML...)
} else if isFilePath(addon) {
addonYAML, err := ioutil.ReadFile(addon)
addonYAML, err := os.ReadFile(addon)
if err != nil {
return err
}
@@ -324,7 +324,7 @@ func getAddonFromURL(yamlURL string) ([]byte, error) {
defer resp.Body.Close()
addonYaml, err := ioutil.ReadAll(resp.Body)
addonYaml, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err