mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: replace os.MkdirTemp with T.TempDir
Updates #45402 Change-Id: I573133d6b987e8ac23e3e2018652612af684c755 Reviewed-on: https://go-review.googlesource.com/c/go/+/307990 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
This commit is contained in:
parent
fca51ba24a
commit
f60aa7a18c
4 changed files with 8 additions and 32 deletions
|
|
@ -12,11 +12,7 @@ import (
|
|||
)
|
||||
|
||||
func TestWin32finddata(t *testing.T) {
|
||||
dir, err := os.MkdirTemp("", "go-build")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temp directory: %v", err)
|
||||
}
|
||||
defer os.RemoveAll(dir)
|
||||
dir := t.TempDir()
|
||||
|
||||
path := filepath.Join(dir, "long_name.and_extension")
|
||||
f, err := os.Create(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue