1
0
Fork 0

refactor: remove ioutil (deprecated)

timestamps
dump_stack() 2024-02-20 12:04:24 +00:00
parent d43cd36858
commit b4bf0314f0
Signed by: dump_stack
GPG Key ID: C9905BA72B5E02BB
1 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,6 @@ package qemu
import (
"crypto/sha512"
"fmt"
"io/ioutil"
"math/rand"
"net"
"os"
@ -159,7 +158,7 @@ func TestSystemCopyFile(t *testing.T) {
localPath := "/bin/sh"
content, err := ioutil.ReadFile(localPath)
content, err := os.ReadFile(localPath)
if err != nil {
return
}
@ -193,7 +192,7 @@ func TestSystemCopyAndRun(t *testing.T) {
randStr := fmt.Sprintf("%d", rand.Int())
content := []byte("#!/bin/sh\n echo -n " + randStr + "\n")
tmpfile, err := ioutil.TempFile("", "executable")
tmpfile, err := os.CreateTemp("", "executable")
if err != nil {
t.Fatal(err)
}