Skip to content

Commit

Permalink
remove os.CreateTemp
Browse files Browse the repository at this point in the history
  • Loading branch information
mauri870 committed Oct 1, 2024
1 parent 4d5d1da commit 11ab9fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions file/fileinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ import (
)

func TestStat(t *testing.T) {
f, err := os.CreateTemp("", "teststat")
tmpDir := t.TempDir()
f, err := os.Create(filepath.Join(tmpDir, "teststat"))
if err != nil {
t.Fatal(err)
}
defer os.Remove(f.Name())
defer f.Close()

link := filepath.Join(os.TempDir(), "teststat-link")
link := filepath.Join(tmpDir, "teststat-link")
if err := os.Symlink(f.Name(), link); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 11ab9fd

Please sign in to comment.