os_test.go: use CreateTemp now that it is implemented

Этот коммит содержится в:
Dan Kegel 2021-12-12 14:57:51 -08:00 коммит произвёл Ron Evans
родитель 51fc78c100
коммит 1f6b4a5e7b

Просмотреть файл

@ -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)
}