diff --git a/maker/project.go b/maker/project.go index a029a3a..0ed3152 100644 --- a/maker/project.go +++ b/maker/project.go @@ -82,7 +82,7 @@ func mainfile(fs fs.FS, path, projectName string) error { return err } - tmpl, err := fs.Open("templates/main.go") + tmpl, err := fs.Open("templates/main.go.tmpl") if err != nil { return err } @@ -136,7 +136,7 @@ func defaultHTTPRoutes(fs fs.FS, path string) error { } func defaultHomepage(fs fs.FS, path string) error { - err := os.Mkdir(filepath.Join(path, "template"), 0777) + err := os.Mkdir(filepath.Join(path, "templates"), 0777) if err != nil { return err } @@ -146,7 +146,7 @@ func defaultHomepage(fs fs.FS, path string) error { return err } - tmpl, err := fs.Open("templates/index.html") + tmpl, err := fs.Open("templates/views/index.html") if err != nil { return err } diff --git a/templates/internal/http/default.go b/templates/http/default.go similarity index 100% rename from templates/internal/http/default.go rename to templates/http/default.go diff --git a/templates/internal/http/http.go b/templates/http/http.go similarity index 100% rename from templates/internal/http/http.go rename to templates/http/http.go