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"), ) }