os: implement and test os.MkdirTemp

This commit is contained in:
Dan Kegel
2021-12-12 13:56:52 -08:00
committed by Ron Evans
parent 0420842f4d
commit 971da0bc09
3 changed files with 156 additions and 7 deletions
-5
View File
@@ -37,11 +37,6 @@ func Mkdir(path string, perm FileMode) error {
return nil
}
// MkdirTemp is a stub, it will always return an error.
func MkdirTemp(dir, pattern string) (string, error) {
return "", &PathError{"mkdirtemp", dir, ErrNotImplemented}
}
// Remove removes a file or (empty) directory. If the operation fails, it will
// return an error of type *PathError.
func Remove(path string) error {