mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
internal/depsfile: deprecate io/ioutil (#338)
This commit is contained in:
parent
e2852ca9fb
commit
b814a5f624
@ -5,7 +5,6 @@ package depsfile
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@ -28,7 +27,7 @@ func TestLoadLocksFromFile(t *testing.T) {
|
|||||||
// Some of the files also have additional assertions that
|
// Some of the files also have additional assertions that
|
||||||
// are encoded in the test code below. These must pass
|
// are encoded in the test code below. These must pass
|
||||||
// in addition to the standard diagnostics tests, if present.
|
// 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 {
|
if err != nil {
|
||||||
t.Fatal(err.Error())
|
t.Fatal(err.Error())
|
||||||
}
|
}
|
||||||
@ -239,7 +238,7 @@ func TestSaveLocksToFile(t *testing.T) {
|
|||||||
t.Fatalf("Expected lock file to be non-executable: %o", mode)
|
t.Fatalf("Expected lock file to be non-executable: %o", mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
gotContentBytes, err := ioutil.ReadFile(filename)
|
gotContentBytes, err := os.ReadFile(filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf(err.Error())
|
t.Fatalf(err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user