Reflect that VCS[ scheme] is always git
git-svn-id: file:///srv/svn/repo/toyohime/trunk@97 922d331f-388e-da47-97a9-ad700dc0b8b9
This commit is contained in:
parent
8b476faa60
commit
af8075602e
@ -160,20 +160,20 @@ func WithGogsStyleSource(importPath, repoPath, ref string) Option {
|
||||
}
|
||||
|
||||
// Creates a Handler that serves a GitHub repository at a specific importPath.
|
||||
func GitHubHandler(importPath, user, repo, vcsScheme string) http.Handler {
|
||||
func GitHubHandler(importPath, user, repo, gitScheme string) http.Handler {
|
||||
ghImportPath := "github.com/" + user + "/" + repo
|
||||
return Handler(
|
||||
WithImport(importPath, "git", vcsScheme+"://"+ghImportPath),
|
||||
WithImport(importPath, "git", gitScheme+"://"+ghImportPath),
|
||||
WithGitHubStyleSource(importPath, "https://"+ghImportPath, "master"),
|
||||
)
|
||||
}
|
||||
|
||||
// Creates a Handler that serves a repository hosted with Gogs at host at a
|
||||
// specific importPath.
|
||||
func GogsHandler(importPath, host, user, repo, vcsScheme string) http.Handler {
|
||||
func GogsHandler(importPath, host, user, repo, gitScheme string) http.Handler {
|
||||
gogsImportPath := host + "/" + user + "/" + repo
|
||||
return Handler(
|
||||
WithImport(importPath, "git", vcsScheme+"://"+gogsImportPath),
|
||||
WithImport(importPath, "git", gitScheme+"://"+gogsImportPath),
|
||||
WithGogsStyleSource(importPath, "https://"+gogsImportPath, "master"),
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user