(t *testing.T, root string, tree map[string]string)
| 2503 | } |
| 2504 | |
| 2505 | func createTree(t *testing.T, root string, tree map[string]string) { |
| 2506 | for path, content := range tree { |
| 2507 | p := filepath.Join(root, strings.Replace(path, "/", pathSeparator, -1)) |
| 2508 | b := filepath.Dir(p) |
| 2509 | if err := os.MkdirAll(b, 0700); err != nil { |
| 2510 | t.Fatal(err) |
| 2511 | } |
| 2512 | if err := os.WriteFile(p, []byte(content), 0600); err != nil { |
| 2513 | t.Fatal(err) |
| 2514 | } |
| 2515 | } |
| 2516 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…