sriracha/template.go

19 lines
318 B
Go

package sriracha
import (
"log"
"text/template"
"code.rocket9labs.com/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
}