1
0
mirror of https://github.com/golang/go synced 2024-11-06 10:46:32 -07:00

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 <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Manlio Perillo 2021-04-11 21:06:24 +02:00 committed by Ian Lance Taylor
parent 0da9eff503
commit 424abc8d3b

View File

@ -56,11 +56,7 @@ func main() {
}
}
`
tmp, err := os.MkdirTemp("", "TestCtrlBreak")
if err != nil {
t.Fatal("TempDir failed: ", err)
}
defer os.RemoveAll(tmp)
tmp := t.TempDir()
// write ctrlbreak.go
name := filepath.Join(tmp, "ctlbreak")