diff options
| author | Christine Dodrill <me@christine.website> | 2019-06-06 18:53:40 -0400 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2019-06-06 18:53:40 -0400 |
| commit | e6d7c3f347d448144ef4079c94931606cb13bae3 (patch) | |
| tree | abcd880aff29c5aefea38fb10123a4836c70fdba /vanity | |
| parent | 4bd92e73f052a0f8b6920372aaa4c51da6957c07 (diff) | |
| download | x-e6d7c3f347d448144ef4079c94931606cb13bae3.tar.xz x-e6d7c3f347d448144ef4079c94931606cb13bae3.zip | |
don't do that
Diffstat (limited to 'vanity')
| -rw-r--r-- | vanity/vanity.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vanity/vanity.go b/vanity/vanity.go index 933d7ed..b637817 100644 --- a/vanity/vanity.go +++ b/vanity/vanity.go @@ -169,22 +169,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, gitScheme, proxyServer string) http.Handler { +func GitHubHandler(importPath, user, repo, gitScheme string) http.Handler { ghImportPath := "github.com/" + user + "/" + repo return Handler( WithImport(importPath, "git", gitScheme+"://"+ghImportPath), - WithGoModProxy(importPath, proxyServer), 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, gitScheme, proxyServer string) http.Handler { +func GogsHandler(importPath, host, user, repo, gitScheme string) http.Handler { gogsImportPath := host + "/" + user + "/" + repo return Handler( WithImport(importPath, "git", gitScheme+"://"+gogsImportPath), - WithGoModProxy(importPath, proxyServer), WithGogsStyleSource(importPath, "https://"+gogsImportPath, "master"), ) } |
