From 8b68d7d7e2e7553afe53823bb84df44d243372ac Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Wed, 4 Aug 2021 07:35:17 -0700 Subject: [PATCH] Remove deprecated io/ioutil usage Issue #1658 Signed-off-by: Allen Porter --- cmd/flux/main_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/flux/main_test.go b/cmd/flux/main_test.go index 0c9e761520..815999bbf9 100644 --- a/cmd/flux/main_test.go +++ b/cmd/flux/main_test.go @@ -5,7 +5,6 @@ import ( "bytes" "context" "io" - "io/ioutil" "os" "testing" @@ -24,7 +23,7 @@ func init() { } func readYamlObjects(objectFile string) ([]client.Object, error) { - obj, err := ioutil.ReadFile(objectFile) + obj, err := os.ReadFile(objectFile) if err != nil { return nil, err } @@ -136,7 +135,7 @@ func (cmd *cmdTestCase) runTestCmd(t *testing.T) { expected = cmd.goldenValue } if cmd.goldenFile != "" { - expectedOutput, err := ioutil.ReadFile(cmd.goldenFile) + expectedOutput, err := os.ReadFile(cmd.goldenFile) if err != nil { t.Fatalf("Error reading golden file: '%s'", err) }