refactor: move from io/ioutil to io and os package

The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun
2021-08-24 18:10:50 +08:00
parent 2b70006e3b
commit c55a4ac779
397 changed files with 1371 additions and 1606 deletions

View File

@@ -2,7 +2,6 @@ package daemon // import "github.com/docker/docker/daemon"
import (
"fmt"
"io/ioutil"
"os"
"testing"
@@ -14,7 +13,7 @@ import (
)
func newDaemonWithTmpRoot(t *testing.T) (*Daemon, func()) {
tmp, err := ioutil.TempDir("", "docker-daemon-unix-test-")
tmp, err := os.MkdirTemp("", "docker-daemon-unix-test-")
assert.NilError(t, err)
d := &Daemon{
repository: tmp,