Replaced deprecated io/ioutil functions (#768)

Signed-off-by: slab713 <109306207+slab713@users.noreply.github.com>
This commit is contained in:
slab713
2022-09-02 14:56:02 +02:00
committed by GitHub
parent 6ae793eb51
commit 8ffb053cec
36 changed files with 249 additions and 280 deletions
+2 -3
View File
@@ -6,7 +6,6 @@ package cli
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"strconv"
@@ -135,7 +134,7 @@ func getConfigMapFromFile(filePath string) ([]interface{}, error) {
file.Close()
data, err := ioutil.ReadFile(filePath)
data, err := os.ReadFile(filePath)
if err != nil {
return nil, err
}
@@ -169,7 +168,7 @@ func saveConfigMapToFile(filePath string, configMap []interface{}) error {
return err
}
if err := ioutil.WriteFile(filePath, marshalled, defaultFilePerms); err != nil {
if err := os.WriteFile(filePath, marshalled, defaultFilePerms); err != nil {
return err
}