Changed the templating engine to a custom one. First bugged working example

This commit is contained in:
Jonas Hahn
2025-08-23 10:43:06 +02:00
parent 19e4834a9e
commit c9a3196ccb
15 changed files with 215 additions and 125 deletions

View File

@@ -1,10 +1,8 @@
package main
import (
"html/template"
"log"
"os"
"time"
"github.com/gin-gonic/gin"
"gorm.io/driver/postgres"
@@ -24,11 +22,7 @@ const (
PORT = "18765"
)
// ===================== Templates =====================
var tpl = template.Must(template.New("").Funcs(template.FuncMap{
"fmtTime": func(t time.Time) string { return t.Local().Format("1000-01-01 10:10") },
}).ParseGlob("templates/*.html"))
var logger = log.Default()
// ===================== Main =====================