os_test.go: use CreateTemp now that it is implemented

This commit is contained in:
Dan Kegel
2021-12-12 14:57:51 -08:00
committed by Ron Evans
parent 51fc78c100
commit 1f6b4a5e7b
+1 -2
View File
@@ -17,8 +17,7 @@ func localTmp() string {
} }
func newFile(testName string, t *testing.T) (f *File) { func newFile(testName string, t *testing.T) (f *File) {
// TODO: use CreateTemp when it lands f, err := CreateTemp("", testName)
f, err := OpenFile(TempDir()+"/_Go_"+testName, O_RDWR|O_CREATE, 0644)
if err != nil { if err != nil {
t.Fatalf("TempFile %s: %s", testName, err) t.Fatalf("TempFile %s: %s", testName, err)
} }