diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-31 16:59:18 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-31 16:59:18 +0800 |
commit | 655b6b211ae6df0186abd740f248939f7ddeaec1 (patch) | |
tree | ec5cdbbc52222f62c8fbb0bcf2a1aa7a9f6eb8b6 /remote_url.go | |
parent | Correct table headers in MR indices (diff) | |
download | forge-655b6b211ae6df0186abd740f248939f7ddeaec1.tar.gz forge-655b6b211ae6df0186abd740f248939f7ddeaec1.tar.zst forge-655b6b211ae6df0186abd740f248939f7ddeaec1.zip |
Add descriptive comments to most Go functions
Diffstat (limited to 'remote_url.go')
-rw-r--r-- | remote_url.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/remote_url.go b/remote_url.go index 9ddc548..06ee0da 100644 --- a/remote_url.go +++ b/remote_url.go @@ -10,10 +10,14 @@ import ( // We don't use path.Join because it collapses multiple slashes into one. +// genSSHRemoteURL generates SSH remote URLs from a given group path and repo +// name. func genSSHRemoteURL(groupPath []string, repoName string) string { return strings.TrimSuffix(config.SSH.Root, "/") + "/" + segmentsToURL(groupPath) + "/:/repos/" + url.PathEscape(repoName) } +// genHTTPRemoteURL generates HTTP remote URLs from a given group path and repo +// name. func genHTTPRemoteURL(groupPath []string, repoName string) string { return strings.TrimSuffix(config.HTTP.Root, "/") + "/" + segmentsToURL(groupPath) + "/:/repos/" + url.PathEscape(repoName) } |