aboutsummaryrefslogtreecommitdiff
path: root/http_template.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-19 11:39:54 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-19 12:03:39 +0800
commit90ce7b1faf976d76329a8c02008cd84c78a753f5 (patch)
tree9374618661e2521fec73ab9fc6f1f0f8f68f0c2b /http_template.go
parentRemove underscores from Go code, pt 3 (diff)
downloadforge-90ce7b1faf976d76329a8c02008cd84c78a753f5.tar.gz
forge-90ce7b1faf976d76329a8c02008cd84c78a753f5.tar.zst
forge-90ce7b1faf976d76329a8c02008cd84c78a753f5.zip
Remove underscores from Go code, pt 4
Diffstat (limited to 'http_template.go')
-rw-r--r--http_template.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/http_template.go b/http_template.go
index 377ad4c..e8520a9 100644
--- a/http_template.go
+++ b/http_template.go
@@ -5,10 +5,10 @@ package main
import "net/http"
-// render_template abstracts out the annoyances of reporting template rendering
+// renderTemplate abstracts out the annoyances of reporting template rendering
// errors.
-func render_template(w http.ResponseWriter, template_name string, params map[string]any) {
- if err := templates.ExecuteTemplate(w, template_name, params); err != nil {
+func renderTemplate(w http.ResponseWriter, templateName string, params map[string]any) {
+ if err := templates.ExecuteTemplate(w, templateName, params); err != nil {
http.Error(w, "Error rendering template: "+err.Error(), http.StatusInternalServerError)
}
}