summaryrefslogtreecommitdiff
path: root/templates/templates.go
blob: 2328b6e6f97939b2353b76555a8bdae2763bd0d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package templates

import (
	"embed"
)

//go:embed *.html
var templates embed.FS

// MustGetTemplate returns a template string with the given name.
func MustGetTemplate(name string) string {
	b, err := templates.ReadFile(name)
	if err != nil {
		panic(err)
	}
	return string(b)
}