Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #14
This commit was merged in pull request #14.
This commit is contained in:
1 parent
4e663d848a
commit
61228b4586
23 files changed
+794
-405
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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()
|
||||
}
|
||||
Reference in new issue
Block a user