From 90ce7b1faf976d76329a8c02008cd84c78a753f5 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 19 Mar 2025 11:39:54 +0800 Subject: Remove underscores from Go code, pt 4 --- http_template.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_template.go') 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) } } -- cgit v1.2.3