mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
docs: change io/ioutil to io/os packages
Change io/ioutil to io/os packages because io/ioutil package is deprecated from 1.16: TempDir => os.MkdirTemp Details: https://go.dev/doc/go1.16#ioutil Fixes: #3265 Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
parent
03546f75a6
commit
5b002f3c88
@ -286,8 +286,8 @@ func TestSomething(t *testing.T) {
|
|||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
|
|
||||||
// Create a temporary directory
|
// Create a temporary directory
|
||||||
tmpdir, err := ioutil.TempDir("", "")
|
tmpdir, err := os.MkdirTemp("", "")
|
||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
|
|
||||||
// Delete it at the end of the test
|
// Delete it at the end of the test
|
||||||
defer os.RemoveAll(tmpdir)
|
defer os.RemoveAll(tmpdir)
|
||||||
|
Loading…
Reference in New Issue
Block a user