aboutsummaryrefslogtreecommitdiff
path: root/remote_url.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote_url.go')
-rw-r--r--remote_url.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/remote_url.go b/remote_url.go
index 9f30993..453ddeb 100644
--- a/remote_url.go
+++ b/remote_url.go
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
-package main
+package forge
import (
"net/url"
@@ -14,12 +14,12 @@ import (
// genSSHRemoteURL generates SSH remote URLs from a given group path and repo
// name.
-func (s *server) genSSHRemoteURL(groupPath []string, repoName string) string {
- return strings.TrimSuffix(s.config.SSH.Root, "/") + "/" + misc.SegmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName)
+func (s *Server) genSSHRemoteURL(groupPath []string, repoName string) string {
+ return strings.TrimSuffix(s.Config.SSH.Root, "/") + "/" + misc.SegmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName)
}
// genHTTPRemoteURL generates HTTP remote URLs from a given group path and repo
// name.
-func (s *server) genHTTPRemoteURL(groupPath []string, repoName string) string {
- return strings.TrimSuffix(s.config.HTTP.Root, "/") + "/" + misc.SegmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName)
+func (s *Server) genHTTPRemoteURL(groupPath []string, repoName string) string {
+ return strings.TrimSuffix(s.Config.HTTP.Root, "/") + "/" + misc.SegmentsToURL(groupPath) + "/-/repos/" + url.PathEscape(repoName)
}