diff --git a/docker/pkg/ioutils/temp_unix.go b/docker/pkg/ioutils/temp_unix.go index e1b9ec4a..1aae401c 100644 --- a/docker/pkg/ioutils/temp_unix.go +++ b/docker/pkg/ioutils/temp_unix.go @@ -8,7 +8,7 @@ package ioutils // import "github.com/ory/dockertest/v3/docker/pkg/ioutils" import "os" -// TempDir on Unix systems is equivalent to ioutil.TempDir. +// TempDir on Unix systems is equivalent to os.MkdirTemp. func TempDir(dir, prefix string) (string, error) { return os.MkdirTemp(dir, prefix) } diff --git a/docker/pkg/ioutils/temp_windows.go b/docker/pkg/ioutils/temp_windows.go index e5f0899f..d5674be7 100644 --- a/docker/pkg/ioutils/temp_windows.go +++ b/docker/pkg/ioutils/temp_windows.go @@ -4,14 +4,14 @@ package ioutils // import "github.com/ory/dockertest/v3/docker/pkg/ioutils" import ( - "io/ioutil" + "os" "github.com/ory/dockertest/v3/docker/pkg/longpath" ) -// TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. +// TempDir is the equivalent of os.MkdirTemp, except that the result is in Windows longpath format. func TempDir(dir, prefix string) (string, error) { - tempDir, err := ioutil.TempDir(dir, prefix) + tempDir, err := os.MkdirTemp(dir, prefix) if err != nil { return "", err } diff --git a/docker/pkg/system/filesys_windows.go b/docker/pkg/system/filesys_windows.go index d32a4378..c3a543c9 100644 --- a/docker/pkg/system/filesys_windows.go +++ b/docker/pkg/system/filesys_windows.go @@ -264,7 +264,7 @@ func nextSuffix() string { return strconv.Itoa(int(1e9 + r%1e9))[1:] } -// TempFileSequential is a copy of ioutil.TempFile, modified to use sequential +// TempFileSequential is a copy of os.CreateTemp, modified to use sequential // file access. Below is the original comment from golang: // TempFile creates a new temporary file in the directory dir // with a name beginning with prefix, opens the file for reading