Öffentliche Dateiansicht: Raw-Dateien, Tree, Releases und Issues sind ohne Login verfügbar.
internal/api/tmpl.go Raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
package api

import (
	"embed"
	"html/template"
	"io/fs"
)

//go:embed templates static
var templateFS embed.FS

var tmpl = template.Must(template.ParseFS(templateFS, "templates/*.html"))

var staticFS = func() fs.FS {
	sub, err := fs.Sub(templateFS, "static")
	if err != nil {
		panic(err)
	}
	return sub
}()