summaryrefslogtreecommitdiff
path: root/distribution/manifest_test.go
diff options
context:
space:
mode:
authorEng Zer Jun <engzerjun@gmail.com>2021-08-24 18:10:50 +0800
committerEng Zer Jun <engzerjun@gmail.com>2021-08-27 14:56:57 +0800
commitc55a4ac7795c7606b548b38e24673733481e2167 (patch)
tree8ea03bdc842959cd3d04a3e37a4ce2a71fa77dbb /distribution/manifest_test.go
parent2b70006e3bfa492b8641ff443493983d832955f4 (diff)
downloaddocker-c55a4ac7795c7606b548b38e24673733481e2167.tar.gz
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>
Diffstat (limited to 'distribution/manifest_test.go')
-rw-r--r--distribution/manifest_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/distribution/manifest_test.go b/distribution/manifest_test.go
index 0976a712ec..7f84b74293 100644
--- a/distribution/manifest_test.go
+++ b/distribution/manifest_test.go
@@ -3,7 +3,6 @@ package distribution
import (
"context"
"encoding/json"
- "io/ioutil"
"os"
"strings"
"sync"
@@ -125,7 +124,7 @@ func TestManifestStore(t *testing.T) {
dgst := digest.Canonical.FromBytes(serialized)
setupTest := func(t *testing.T) (specs.Descriptor, *mockManifestGetter, *manifestStore, content.Store, func(*testing.T)) {
- root, err := ioutil.TempDir("", strings.Replace(t.Name(), "/", "_", -1))
+ root, err := os.MkdirTemp("", strings.Replace(t.Name(), "/", "_", -1))
assert.NilError(t, err)
defer func() {
if t.Failed() {