aboutsummaryrefslogtreecommitdiff
path: root/ssh_utils.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 20:21:32 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 20:21:32 +0800
commit71ab9b7f14118f02dd18cd733bd4e0ad19ece590 (patch)
tree0303cbee651a4e1cee62a348d25066b9543f4425 /ssh_utils.go
parentgit2d: Remove UTF-8 checks (diff)
downloadforge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.gz
forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.tar.zst
forge-71ab9b7f14118f02dd18cd733bd4e0ad19ece590.zip
config shall no longer be a global variable
Diffstat (limited to 'ssh_utils.go')
-rw-r--r--ssh_utils.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh_utils.go b/ssh_utils.go
index c906ab3..02069dd 100644
--- a/ssh_utils.go
+++ b/ssh_utils.go
@@ -18,7 +18,7 @@ var errIllegalSSHRepoPath = errors.New("illegal SSH repo path")
// getRepoInfo2 also fetches repo information... it should be deprecated and
// implemented in individual handlers.
-func getRepoInfo2(ctx context.Context, sshPath, sshPubkey string) (groupPath []string, repoName string, repoID int, repoPath string, directAccess bool, contribReq, userType string, userID int, err error) {
+func (s *server) getRepoInfo2(ctx context.Context, sshPath, sshPubkey string) (groupPath []string, repoName string, repoID int, repoPath string, directAccess bool, contribReq, userType string, userID int, err error) {
var segments []string
var sepIndex int
var moduleType, moduleName string
@@ -64,7 +64,7 @@ func getRepoInfo2(ctx context.Context, sshPath, sshPubkey string) (groupPath []s
repoName = moduleName
switch moduleType {
case "repos":
- _1, _2, _3, _4, _5, _6, _7 := getRepoInfo(ctx, groupPath, moduleName, sshPubkey)
+ _1, _2, _3, _4, _5, _6, _7 := s.getRepoInfo(ctx, groupPath, moduleName, sshPubkey)
return groupPath, repoName, _1, _2, _3, _4, _5, _6, _7
default:
return []string{}, "", 0, "", false, "", "", 0, errIllegalSSHRepoPath