From ff351c2f6fce2344bb76a5a74b279d0bdcb4255d Mon Sep 17 00:00:00 2001 From: cubixle Date: Fri, 22 Jul 2022 14:04:10 +0100 Subject: [PATCH] update/fix templates location --- maker/project.go | 6 +++--- templates/{internal => }/http/default.go | 0 templates/{internal => }/http/http.go | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename templates/{internal => }/http/default.go (100%) rename templates/{internal => }/http/http.go (100%) 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