diff options
-rw-r--r-- | main.go | 3 | ||||
-rw-r--r-- | view/templates.go | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -10,7 +10,6 @@ import ( "path/filepath" "xengineering.eu/ceres/model" - "xengineering.eu/ceres/view" ) func main() { @@ -39,8 +38,6 @@ func main() { model.InjectTestRecipes() - view.Init() - server := NewServer(config.HttpAddress) go server.Start() defer server.Stop() diff --git a/view/templates.go b/view/templates.go index d08f95e..7b51860 100644 --- a/view/templates.go +++ b/view/templates.go @@ -10,6 +10,6 @@ var htmlFS embed.FS var html *template.Template -func Init() { +func init() { html = template.Must(template.New("html").ParseFS(htmlFS, "html/*.html")) } |