refactor: move from io/ioutil to io and os packages (#5266)
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. [1]: https://golang.org/doc/go1.16#ioutil Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -107,7 +107,7 @@ func (t *TestCtx) Setup(yamlPath string, crdPath string, schemes ...AddToSchemeF
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
bytes, err := ioutil.ReadFile(yamlPath)
|
||||
bytes, err := os.ReadFile(yamlPath)
|
||||
if err != nil {
|
||||
klog.Errorln("Failed to read yaml file")
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user