aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/const_file_test.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-02-23 14:28:18 +0100
committerGitHub <noreply@github.com>2023-02-23 14:28:18 +0100
commit4359978ef22a22ddd5a19adf18cbc80cb44244fb (patch)
tree7952da94e27417b39ddf952d9e0bab431dafc4c5 /pkg/compiler/const_file_test.go
parent9e2ebb3c174f1e168bc1fbadd5f02f2e25e314fc (diff)
all: ioutil is deprecated in go1.19 (#3718)
Diffstat (limited to 'pkg/compiler/const_file_test.go')
-rw-r--r--pkg/compiler/const_file_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/compiler/const_file_test.go b/pkg/compiler/const_file_test.go
index b38d0795d..ccfce4c95 100644
--- a/pkg/compiler/const_file_test.go
+++ b/pkg/compiler/const_file_test.go
@@ -4,7 +4,6 @@
package compiler
import (
- "io/ioutil"
"os"
"path/filepath"
"testing"
@@ -91,7 +90,7 @@ CONST5_SOME_UNDEFINED2 = 100, arch3:???
t.Fatal(diff)
}
{
- file, err := ioutil.TempFile("", "syz-const")
+ file, err := os.CreateTemp("", "syz-const")
if err != nil {
t.Fatal(err)
}
@@ -112,7 +111,7 @@ CONST5_SOME_UNDEFINED2 = 100, arch3:???
dir := t.TempDir()
for name, arch := range arches {
file := filepath.Join(dir, "consts_"+name+".const")
- if err := ioutil.WriteFile(file, []byte(arch.oldFormat), 0600); err != nil {
+ if err := os.WriteFile(file, []byte(arch.oldFormat), 0600); err != nil {
t.Fatal(err)
}
}