diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-12-04 13:27:43 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2022-12-04 14:07:39 -0800 |
| commit | 02875cef9010633b6689cfd1e2ceec9107b756b4 (patch) | |
| tree | 9f310eac398e99dd12f42d94967b2e1bf1c7fe83 /filesystem/path_test.go | |
| parent | 5373b314473b08f13372ab55b551738307a85fbd (diff) | |
Stop using deprecated package io/ioutil
Since Go 1.16 (which recently became the minimum supported Go version
for this project), the package io/ioutil is deprecated in favor of
equivalent functionality in the io and os packages. staticcheck warns
about this. Address all the warnings by switching to the non-deprecated
replacement functions.
Diffstat (limited to 'filesystem/path_test.go')
| -rw-r--r-- | filesystem/path_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/filesystem/path_test.go b/filesystem/path_test.go index 1c59dd5..d325054 100644 --- a/filesystem/path_test.go +++ b/filesystem/path_test.go @@ -20,7 +20,6 @@ package filesystem import ( "fmt" - "io/ioutil" "os" "testing" @@ -61,7 +60,7 @@ func TestHaveReadAccessTo(t *testing.T) { if util.IsUserRoot() { t.Skip("This test cannot be run as root") } - file, err := ioutil.TempFile("", "fscrypt_test") + file, err := os.CreateTemp("", "fscrypt_test") if err != nil { t.Fatal(err) } |