sriracha/template.go
2023-04-20 20:03:02 -07:00

18 lines
319 B
Go

package sriracha
import (
"log"
"text/template"
"code.rocketnine.space/tslocum/sriracha/asset"
)
var templates = loadTemplates()
func loadTemplates() *template.Template {
t, err := template.ParseFS(asset.FS, "template/*.gohtml")
if err != nil {
log.Fatalf("failed to load templates: %s", err)
}
return t
}