diff --git a/web/web.go b/web/web.go index afb3d81..dd10c37 100644 --- a/web/web.go +++ b/web/web.go @@ -1,15 +1,13 @@ package web import ( - "dwelling-radio/pkg/logging" "embed" - "html/template" "io/fs" "net/http" - - "github.com/Joker/jade" ) +//go:generate /home/arav/go/bin/jade -pkg=web -writer templates/index.jade + //go:embed assets var assetsDir embed.FS @@ -21,19 +19,3 @@ func Assets() http.FileSystem { func AssetsGetFile(path string) ([]byte, error) { return assetsDir.ReadFile("assets/" + path) } - -//go:embed templates/index.jade -var indexJadeTpl []byte -var IndexTemplate *template.Template - -func CompileTemplates(lErr *logging.Logger) { - indexParsedTpl, err := jade.Parse("index", indexJadeTpl) - if err != nil { - lErr.Fatalln(err) - } - - IndexTemplate, err = template.New("index").Parse(indexParsedTpl) - if err != nil { - lErr.Fatalln(err) - } -}