Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
package paths

import (
"io/ioutil"
"os"
"runtime"
)
Expand All @@ -53,7 +52,7 @@ func TempDir() *Path {
// the new directory. If dir is the empty string, TempDir uses the
// default directory for temporary files
func MkTempDir(dir, prefix string) (*Path, error) {
path, err := ioutil.TempDir(dir, prefix)
path, err := os.MkdirTemp(dir, prefix)
if err != nil {
return nil, err
}
Expand All @@ -70,7 +69,7 @@ func MkTempFile(dir *Path, prefix string) (*os.File, error) {
if dir != nil {
tmpDir = dir.String()
}
return ioutil.TempFile(tmpDir, prefix)
return os.CreateTemp(tmpDir, prefix)
}

// Getwd returns a rooted path name corresponding to the current
Expand Down