Stop using deprecated ioutil functions

This commit is contained in:
Katrina Verey
2022-08-10 16:59:18 -04:00
parent 416eed97c4
commit f6b72077c8
70 changed files with 322 additions and 362 deletions

View File

@@ -5,7 +5,7 @@ package commands_test
import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
@@ -19,7 +19,7 @@ import (
func TestCountCommand_files(t *testing.T) {
d := t.TempDir()
err := ioutil.WriteFile(filepath.Join(d, "f1.yaml"), []byte(`
err := os.WriteFile(filepath.Join(d, "f1.yaml"), []byte(`
kind: Deployment
metadata:
labels:
@@ -42,7 +42,7 @@ spec:
if !assert.NoError(t, err) {
return
}
err = ioutil.WriteFile(filepath.Join(d, "f2.yaml"), []byte(`kind: Deployment
err = os.WriteFile(filepath.Join(d, "f2.yaml"), []byte(`kind: Deployment
metadata:
labels:
app: nginx