(dir string, content map[string]string)
| 17 | } |
| 18 | |
| 19 | func createFiles(dir string, content map[string]string) { |
| 20 | for relPath, content := range content { |
| 21 | contentPath := filepath.Join(dir, relPath) |
| 22 | if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil { |
| 23 | panic(err) |
| 24 | } |
| 25 | if err := os.WriteFile(contentPath, []byte(content), 0666); err != nil { |
| 26 | panic(err) |
| 27 | } |
| 28 | log.Printf("created tmp file: %s", contentPath) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | type configDirSingleton struct { |
| 33 | dirs map[string]string |
no test coverage detected
searching dependent graphs…