From 99fd8a9cf96a51fcd9e50445cb035cc9ecd012de Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 22 Mar 2025 13:44:03 +0800 Subject: Variable name lengths --- http_handle_repo_log.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'http_handle_repo_log.go') diff --git a/http_handle_repo_log.go b/http_handle_repo_log.go index 2dec6bd..8d54d28 100644 --- a/http_handle_repo_log.go +++ b/http_handle_repo_log.go @@ -12,7 +12,7 @@ import ( ) // TODO: I probably shouldn't include *all* commits here... -func httpHandleRepoLog(w http.ResponseWriter, _ *http.Request, params map[string]any) { +func httpHandleRepoLog(writer http.ResponseWriter, _ *http.Request, params map[string]any) { var repo *git.Repository var refHash plumbing.Hash var err error @@ -21,15 +21,15 @@ func httpHandleRepoLog(w http.ResponseWriter, _ *http.Request, params map[string repo = params["repo"].(*git.Repository) if refHash, err = getRefHash(repo, params["ref_type"].(string), params["ref_name"].(string)); err != nil { - http.Error(w, "Error getting ref hash: "+err.Error(), http.StatusInternalServerError) + http.Error(writer, "Error getting ref hash: "+err.Error(), http.StatusInternalServerError) return } if commits, err = getRecentCommits(repo, refHash, -1); err != nil { - http.Error(w, "Error getting recent commits: "+err.Error(), http.StatusInternalServerError) + http.Error(writer, "Error getting recent commits: "+err.Error(), http.StatusInternalServerError) return } params["commits"] = commits - renderTemplate(w, "repo_log", params) + renderTemplate(writer, "repo_log", params) } -- cgit v1.2.3