aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'server.go')
-rw-r--r--server.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.go b/server.go
index 90b2e2e..feab082 100644
--- a/server.go
+++ b/server.go
@@ -5,6 +5,7 @@ package forge
import (
"errors"
+ "html/template"
"io/fs"
"log"
"log/slog"
@@ -40,6 +41,8 @@ type Server struct {
// packPasses contains hook cookies mapped to their packPass.
packPasses cmap.Map[string, packPass]
+
+ templates *template.Template
}
func (s *Server) Setup() {
@@ -65,7 +68,7 @@ func (s *Server) Run() {
slog.Error("deploying hooks", "error", err)
os.Exit(1)
}
- if err := loadTemplates(); err != nil {
+ if err := s.loadTemplates(); err != nil {
slog.Error("loading templates", "error", err)
os.Exit(1)
}