blob: f64d6eca39f08470c17be17ee1ff080ac5a93b28 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package main
import (
"net/url"
"strings"
)
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)
}
|