1
0
mirror of synced 2026-03-18 08:56:57 +00:00

Merge pull request #1687 from allenporter/flux-cmd-ioutil

Remove deprecated io/ioutil usage
This commit is contained in:
Hidde Beydals
2021-08-04 16:58:51 +02:00
committed by GitHub

View File

@@ -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)
}