diff options
author | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:21:32 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-04-05 20:21:32 +0800 |
commit | 71ab9b7f14118f02dd18cd733bd4e0ad19ece590 (patch) | |
tree | 0303cbee651a4e1cee62a348d25066b9543f4425 /http_handle_branches.go | |
parent | git2d: Remove UTF-8 checks (diff) | |
download | forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.gz forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.zst forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.zip |
config shall no longer be a global variable
Diffstat (limited to 'http_handle_branches.go')
-rw-r--r-- | http_handle_branches.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |