aboutsummaryrefslogtreecommitdiff
path: root/http_template.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-18 10:23:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-18 10:23:44 +0800
commitdd95e2dbfad7f39060dc70f145d0e1478770e454 (patch)
tree863f9c3a941f21a66fe0af1cbe9a09ae444c8a46 /http_template.go
parentREADME.md: Mention that anonymous pushes to contrib/ are possible now (diff)
downloadforge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.gz
forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.zst
forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.zip
*.go: Add some comments for docs
Diffstat (limited to 'http_template.go')
-rw-r--r--http_template.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/http_template.go b/http_template.go
index d135c71..96338a3 100644
--- a/http_template.go
+++ b/http_template.go
@@ -2,6 +2,8 @@ package main
import "net/http"
+// render_template abstracts out the annoyances of reporting template rendering
+// errors.
func render_template(w http.ResponseWriter, template_name string, params map[string]any) {
err := templates.ExecuteTemplate(w, template_name, params)
if err != nil {