18 lines
319 B
Go
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
|
|
}
|