Changed Project structure, added Hot Reload of gohtml files for Develop and embedding of gohtml files for Release

This commit is contained in:
Pablu23
2024-02-23 10:59:26 +01:00
parent cc7009c106
commit 9bc483afb3
13 changed files with 196 additions and 143 deletions

View File

@@ -0,0 +1,18 @@
//go:build Develop
package view
import (
"html/template"
)
func GetViewTemplate(view View) (*template.Template, error) {
var path string
switch view {
case Menu:
path = "internal/view/Views/menu.gohtml"
case Viewer:
path = "internal/view/Views/viewer.gohtml"
}
return template.ParseFiles(path)
}