all: replace uses of deprecated ioutil functions

This commit is contained in:
Dan Kortschak
2021-08-12 19:49:38 +09:30
parent f12fdcffef
commit af39aebcaa
14 changed files with 29 additions and 37 deletions

View File

@@ -9,7 +9,6 @@ import (
"encoding/base64"
"image"
"image/png"
"io/ioutil"
"os"
"path/filepath"
"sort"
@@ -60,13 +59,13 @@ func checkRenderedLayout(t *testing.T, path string) (ok bool) {
// Read the images we've just generated and check them against the
// Golden Images.
got, err := ioutil.ReadFile(path)
got, err := os.ReadFile(path)
if err != nil {
t.Errorf("failed to read %s: %v", path, err)
return true
}
golden := goldenPath(path)
want, err := ioutil.ReadFile(golden)
want, err := os.ReadFile(golden)
if err != nil {
t.Errorf("failed to read golden file %s: %v", golden, err)
return true