diff --git a/src/os/os_test.go b/src/os/os_test.go index 9f3f6a1a..c061bf51 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -17,8 +17,7 @@ func localTmp() string { } func newFile(testName string, t *testing.T) (f *File) { - // TODO: use CreateTemp when it lands - f, err := OpenFile(TempDir()+"/_Go_"+testName, O_RDWR|O_CREATE, 0644) + f, err := CreateTemp("", testName) if err != nil { t.Fatalf("TempFile %s: %s", testName, err) }