mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 01:04:25 +01:00
runtime: change io/ioutil to io/os packages
Change io/ioutil to io/os packages because io/ioutil package is deprecated from 1.16: Discard => io.Discard NopCloser => io.NopCloser ReadAll => io.ReadAll ReadDir => os.ReadDir ReadFile => os.ReadFile TempDir => os.MkdirTemp TempFile => os.CreateTemp WriteFile => os.WriteFile Details: https://go.dev/doc/go1.16#ioutil Fixes: #3265 Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
@@ -8,7 +8,6 @@ package virtcontainers
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -111,7 +110,7 @@ func TestQemuAmd64MemoryTopology(t *testing.T) {
|
||||
func TestQemuAmd64AppendImage(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
f, err := ioutil.TempFile("", "img")
|
||||
f, err := os.CreateTemp("", "img")
|
||||
assert.NoError(err)
|
||||
defer func() { _ = f.Close() }()
|
||||
defer func() { _ = os.Remove(f.Name()) }()
|
||||
|
||||
Reference in New Issue
Block a user