1
0
mirror of synced 2026-02-13 13:06:56 +00:00

chore: remove deprecated io/ioutil

Signed-off-by: Dmitry Rybin <ayrowa@yandex.ru>
This commit is contained in:
Dmitry Rybin
2021-07-30 20:49:44 +02:00
parent d40685ab62
commit 7f425efa6b
18 changed files with 30 additions and 45 deletions

View File

@@ -21,7 +21,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -304,7 +303,7 @@ func CompatibleVersion(binary, target string) bool {
}
func ExtractCRDs(inManifestPath, outManifestPath string) error {
manifests, err := ioutil.ReadFile(inManifestPath)
manifests, err := os.ReadFile(inManifestPath)
if err != nil {
return err
}
@@ -338,5 +337,5 @@ func ExtractCRDs(inManifestPath, outManifestPath string) error {
return fmt.Errorf("no CRDs found in %s", inManifestPath)
}
return ioutil.WriteFile(outManifestPath, []byte(crds), os.ModePerm)
return os.WriteFile(outManifestPath, []byte(crds), os.ModePerm)
}