(t *testing.T)
| 343 | } |
| 344 | |
| 345 | func createTmpDir(t *testing.T) string { |
| 346 | t.Helper() |
| 347 | |
| 348 | // Create a temp directory. Passing an empty string for the first argument |
| 349 | // uses the system temp directory. |
| 350 | dir, err := os.MkdirTemp("", "filewatcher*") |
| 351 | if err != nil { |
| 352 | t.Fatalf("os.MkdirTemp() failed: %v", err) |
| 353 | } |
| 354 | t.Logf("Using tmpdir: %s", dir) |
| 355 | return dir |
| 356 | } |
no test coverage detected