aboutsummaryrefslogtreecommitdiff
path: root/ssh_url_generation.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-16 02:28:55 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-16 02:28:55 +0800
commit6f9f62d453c94ac8d69baebcf51589d9b623d306 (patch)
treef311981eb5b86049ca85e9e2a58a86d5f4c45aea /ssh_url_generation.go
parenthttp_*: Add HTTP cloning (diff)
downloadforge-6f9f62d453c94ac8d69baebcf51589d9b623d306.tar.gz
forge-6f9f62d453c94ac8d69baebcf51589d9b623d306.tar.zst
forge-6f9f62d453c94ac8d69baebcf51589d9b623d306.zip
repo_index: Add HTTP clone along with SSH
Diffstat (limited to '')
-rw-r--r--remote_url.go (renamed from ssh_url_generation.go)4
1 files changed, 4 insertions, 0 deletions
diff --git a/ssh_url_generation.go b/remote_url.go
index bdef57f..f64d6ec 100644
--- a/ssh_url_generation.go
+++ b/remote_url.go
@@ -8,3 +8,7 @@ import (
func generate_ssh_remote_url(group_name, repo_name string) string {
return strings.TrimSuffix(config.SSH.Root, "/") + "/" + url.PathEscape(group_name) + "/:/repos/" + url.PathEscape(repo_name)
}
+
+func generate_http_remote_url(group_name, repo_name string) string {
+ return strings.TrimSuffix(config.HTTP.Root, "/") + "/" + url.PathEscape(group_name) + "/:/repos/" + url.PathEscape(repo_name)
+}