add makefile

This commit is contained in:
ari melody 2025-06-08 21:40:19 +01:00
parent 59230b7ad5
commit 6708d9ff33
Signed by: ari
GPG key ID: CF99829C92678188
3 changed files with 34 additions and 1 deletions

View file

@ -12,8 +12,12 @@ import (
"strconv"
"strings"
"time"
_ "embed"
)
//go:embed templates/dir.html
var dirTemplateSrc string
type (
Directory struct {
Name string
@ -89,7 +93,7 @@ func main() {
".DS_Store",
}
dirTemplate, err := template.ParseGlob("./templates/dir.html")
dirTemplate, err := template.New("dir").Parse(dirTemplateSrc)
if err != nil {
fmt.Fprintf(os.Stderr, "fatal: failed to parse directory template: %v\n", err)
os.Exit(1)