Skip to content

Commit 1c58d4b

Browse files
committed
Update use of deprecated ioutils module
The ioutils module was deprecated in Go 1.16. This updates the example test code to use the newer recommended replacement. Signed-off-by: Sean McGinnis <[email protected]>
1 parent 1b9e1fc commit 1c58d4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/en/examples/examples_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"bytes"
2222
"fmt"
2323
"io"
24-
"io/ioutil"
2524
"os"
2625
"path/filepath"
2726
"strings"
@@ -365,7 +364,7 @@ func walkConfigFiles(inDir string, t *testing.T, fn func(name, path string, data
365364

366365
file := filepath.Base(path)
367366
if ext := filepath.Ext(file); ext == ".json" || ext == ".yaml" {
368-
data, err := ioutil.ReadFile(path)
367+
data, err := os.ReadFile(path)
369368
if err != nil {
370369
return err
371370
}

0 commit comments

Comments
 (0)