Jeffrey Paul
61228b4586
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #14
20 lines
284 B
Go
20 lines
284 B
Go
package templates
|
|
|
|
import (
|
|
"embed"
|
|
"strings"
|
|
)
|
|
|
|
//go:embed *.html
|
|
var Templates embed.FS
|
|
|
|
func MustString(filename string) string {
|
|
bytes, error := Templates.ReadFile(filename)
|
|
if error != nil {
|
|
panic(error)
|
|
}
|
|
var out strings.Builder
|
|
out.Write(bytes)
|
|
return out.String()
|
|
}
|