Skip to content

Commit 424abc8

Browse files
perilloianlancetaylor
authored andcommitted
os/signal: replace os.MkdirTemp with T.TempDir
Updates #45402. Change-Id: I6fe356b51bc825a907f979d9c44432a4d43d1f6e Reviewed-on: https://go-review.googlesource.com/c/go/+/308996 Trust: Tobias Klauser <[email protected]> Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 0da9eff commit 424abc8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/os/signal/signal_windows_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ func main() {
5656
}
5757
}
5858
`
59-
tmp, err := os.MkdirTemp("", "TestCtrlBreak")
60-
if err != nil {
61-
t.Fatal("TempDir failed: ", err)
62-
}
63-
defer os.RemoveAll(tmp)
59+
tmp := t.TempDir()
6460

6561
// write ctrlbreak.go
6662
name := filepath.Join(tmp, "ctlbreak")

0 commit comments

Comments
 (0)