Dir is a wrapper for os.MkdirTemp that fails the test on errors.
(t *testing.T)
| 26 | // Dir is a wrapper for os.MkdirTemp that |
| 27 | // fails the test on errors. |
| 28 | func Dir(t *testing.T) string { |
| 29 | dir, err := os.MkdirTemp("", "maddy-tests-") |
| 30 | if err != nil { |
| 31 | t.Fatalf("can't create test dir: %v", err) |
| 32 | } |
| 33 | return dir |
| 34 | } |