summaryrefslogtreecommitdiff
path: root/testutil/fakegit
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 /testutil/fakegit
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 'testutil/fakegit')
-rw-r--r--testutil/fakegit/fakegit.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/testutil/fakegit/fakegit.go b/testutil/fakegit/fakegit.go
index e5375936b9..33594dc8a8 100644
--- a/testutil/fakegit/fakegit.go
+++ b/testutil/fakegit/fakegit.go
@@ -2,7 +2,6 @@ package fakegit // import "github.com/docker/docker/testutil/fakegit"
import (
"fmt"
- "io/ioutil"
"net/http"
"net/http/httptest"
"os"
@@ -76,7 +75,7 @@ func New(c testing.TB, name string, files map[string]string, enforceLocalServer
c.Fatalf("error trying to commit to repo: %s (%s)", err, output)
}
- root, err := ioutil.TempDir("", "docker-test-git-repo")
+ root, err := os.MkdirTemp("", "docker-test-git-repo")
if err != nil {
c.Fatal(err)
}