mirror of
https://github.com/gonum/gonum.git
synced 2025-10-07 08:01:20 +08:00
all: replace uses of deprecated ioutil functions
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user