From 02875cef9010633b6689cfd1e2ceec9107b756b4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 4 Dec 2022 13:27:43 -0800 Subject: 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. --- actions/config_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actions/config_test.go') diff --git a/actions/config_test.go b/actions/config_test.go index 3599667..49838e3 100644 --- a/actions/config_test.go +++ b/actions/config_test.go @@ -19,7 +19,6 @@ package actions import ( - "io/ioutil" "os" "path/filepath" "testing" @@ -37,7 +36,7 @@ func TestConfigFileIsCreatedWithCorrectMode(t *testing.T) { defer unix.Umask(oldMask) unix.Umask(0077) - tempDir, err := ioutil.TempDir("", "fscrypt") + tempDir, err := os.MkdirTemp("", "fscrypt") if err != nil { t.Fatal(err) } @@ -57,7 +56,7 @@ func TestConfigFileIsCreatedWithCorrectMode(t *testing.T) { } func TestCreateConfigFileV2Policy(t *testing.T) { - tempDir, err := ioutil.TempDir("", "fscrypt") + tempDir, err := os.MkdirTemp("", "fscrypt") if err != nil { t.Fatal(err) } -- cgit v1.2.3