aboutsummaryrefslogtreecommitdiff
path: root/resources.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-18 14:30:24 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-18 14:30:24 +0800
commite49ec58808e437b77759e5ab74baa5a6296b8ce7 (patch)
treef94a0121d634df69fed506955563a8000be81c75 /resources.go
parenthttp_server.go: Error out on subgroups (diff)
downloadforge-e49ec58808e437b77759e5ab74baa5a6296b8ce7.tar.gz
forge-e49ec58808e437b77759e5ab74baa5a6296b8ce7.tar.zst
forge-e49ec58808e437b77759e5ab74baa5a6296b8ce7.zip
*.go: Reformat
Diffstat (limited to 'resources.go')
-rw-r--r--resources.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/resources.go b/resources.go
index 2fe7883..81830a4 100644
--- a/resources.go
+++ b/resources.go
@@ -8,6 +8,7 @@ import (
)
// We embed all source for easy AGPL compliance.
+//
//go:embed .gitignore .gitattributes
//go:embed LICENSE README.md
//go:embed *.go go.mod go.sum
@@ -18,6 +19,7 @@ import (
//go:embed git_hooks_client/*.c
//go:embed vendor/*
var source_fs embed.FS
+
var source_handler = http.StripPrefix(
"/:/source/",
http.FileServer(http.FS(source_fs)),
@@ -27,6 +29,7 @@ var source_handler = http.StripPrefix(
var resources_fs embed.FS
var templates *template.Template
+
func load_templates() (err error) {
templates, err = template.New("templates").Funcs(template.FuncMap{
"first_line": first_line,