internal/depsfile: deprecate io/ioutil (#338)

This commit is contained in:
Lars Lehtonen 2023-09-07 09:52:18 -07:00 committed by GitHub
parent e2852ca9fb
commit b814a5f624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,6 @@ package depsfile
import (
"bufio"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -28,7 +27,7 @@ func TestLoadLocksFromFile(t *testing.T) {
// Some of the files also have additional assertions that
// are encoded in the test code below. These must pass
// in addition to the standard diagnostics tests, if present.
files, err := ioutil.ReadDir("testdata/locks-files")
files, err := os.ReadDir("testdata/locks-files")
if err != nil {
t.Fatal(err.Error())
}
@ -239,7 +238,7 @@ func TestSaveLocksToFile(t *testing.T) {
t.Fatalf("Expected lock file to be non-executable: %o", mode)
}
gotContentBytes, err := ioutil.ReadFile(filename)
gotContentBytes, err := os.ReadFile(filename)
if err != nil {
t.Fatalf(err.Error())
}