big tings

This commit is contained in:
Max Richter
2025-08-17 15:16:17 +02:00
parent 40b9be887d
commit c687eff53d
958 changed files with 32279 additions and 704 deletions

25
registry/templates.go Normal file
View File

@@ -0,0 +1,25 @@
// Package registry provides functionality for managing and accessing embedded file systems and directories.
package registry
import (
"embed"
"io"
)
//go:embed templates/*.marka
var templates embed.FS
func GetTemplate(name string) (string, error) {
templateFile, err := templates.Open("templates/" + name + ".marka")
if err != nil {
return "", err
}
defer templateFile.Close()
templateBytes, err := io.ReadAll(templateFile)
if err != nil {
return "", err
}
return string(templateBytes), nil
}