Changed the templating engine to a custom one. First bugged working example
This commit is contained in:
@@ -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 =====================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user