From 71ab9b7f14118f02dd18cd733bd4e0ad19ece590 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 20:21:32 +0800 Subject: config shall no longer be a global variable --- http_handle_branches.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_handle_branches.go') diff --git a/http_handle_branches.go b/http_handle_branches.go index 48ba5ab..d386b82 100644 --- a/http_handle_branches.go +++ b/http_handle_branches.go @@ -13,7 +13,7 @@ import ( ) // httpHandleRepoBranches provides the branches page in repos. -func httpHandleRepoBranches(writer http.ResponseWriter, _ *http.Request, params map[string]any) { +func (s *server) httpHandleRepoBranches(writer http.ResponseWriter, _ *http.Request, params map[string]any) { var repo *git.Repository var repoName string var groupPath []string @@ -37,8 +37,8 @@ func httpHandleRepoBranches(writer http.ResponseWriter, _ *http.Request, params } params["branches"] = branches - params["http_clone_url"] = genHTTPRemoteURL(groupPath, repoName) - params["ssh_clone_url"] = genSSHRemoteURL(groupPath, repoName) + params["http_clone_url"] = s.genHTTPRemoteURL(groupPath, repoName) + params["ssh_clone_url"] = s.genSSHRemoteURL(groupPath, repoName) params["notes"] = notes renderTemplate(writer, "repo_branches", params) -- cgit v1.2.3