1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00
gron/template.go

22 lines
321 B
Go
Raw Normal View History

2022-03-26 13:23:39 +05:00
package main
import (
"embed"
2022-03-26 13:23:39 +05:00
"html/template"
log "github.com/sirupsen/logrus"
)
//go:embed webui/*
var siteFS embed.FS
2022-03-26 13:23:39 +05:00
var templates *template.Template
2022-03-26 13:23:39 +05:00
func initTemplate() {
var err error
templates, err = template.ParseFS(siteFS, "webui/*.htm")
2022-03-26 13:23:39 +05:00
if err != nil {
log.Fatalln("init template error:", err)
}
}