From af8075602e0259aa4abf23e32ce127f54ec47f27 Mon Sep 17 00:00:00 2001 From: jonbetti Date: Thu, 7 Jun 2018 18:02:52 +0000 Subject: [PATCH] Reflect that VCS[ scheme] is always git git-svn-id: file:///srv/svn/repo/toyohime/trunk@97 922d331f-388e-da47-97a9-ad700dc0b8b9 --- vanity.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vanity.go b/vanity.go index 0bf6bf7..ff24636 100644 --- a/vanity.go +++ b/vanity.go @@ -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"), ) }