Skip to content

Commit

Permalink
Remove deprecated io/ioutil usage
Browse files Browse the repository at this point in the history
Issue #1658

Signed-off-by: Allen Porter <[email protected]>
  • Loading branch information
allenporter committed Aug 4, 2021
1 parent ba1bba1 commit 8b68d7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/flux/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"bytes"
"context"
"io"
"io/ioutil"
"os"
"testing"

Expand All @@ -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
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 8b68d7d

Please sign in to comment.