(w io.Writer, template, target string)
| 21 | ) |
| 22 | |
| 23 | func InitFromName(w io.Writer, template, target string) error { |
| 24 | templatePath, ok := templates[template] |
| 25 | if !ok { |
| 26 | return usererr.New("unknown template name or format %q", template) |
| 27 | } |
| 28 | return InitFromRepo(w, "https://github.com/jetify-com/devbox", templatePath, target) |
| 29 | } |
| 30 | |
| 31 | func InitFromRepo(w io.Writer, repo, subdir, target string) error { |
| 32 | if err := createDirAndEnsureEmpty(target); err != nil { |
no test coverage detected