summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-21 10:43:29 +0800
committerGitHub <noreply@github.com>2017-04-21 10:43:29 +0800
commitf0db3da713eb9440923ddf376349e72b65f129ef (patch)
treefed96b5b8c2dbd95ec5ee3dd104a77b5ca78e42f /modules
parent42072783c910b6f4119bb410f0e9dd55ebfc0927 (diff)
downloadgitea-f0db3da713eb9440923ddf376349e72b65f129ef.tar.gz
gitea-f0db3da713eb9440923ddf376349e72b65f129ef.zip
fix go get sub package and add domain on installation to let go get work defaultly (#1518)
* fix go get sub package and add domain on installation to let go get work defaultly * fix import sequence * fix .git problem
Diffstat (limited to 'modules')
-rw-r--r--modules/context/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index aae76185e2..4deae2ebba 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -127,7 +127,7 @@ func composeGoGetImport(owner, repo string) string {
func earlyResponseForGoGetMeta(ctx *Context) {
ctx.PlainText(200, []byte(com.Expand(`<meta name="go-import" content="{GoGetImport} git {CloneLink}">`,
map[string]string{
- "GoGetImport": composeGoGetImport(ctx.Params(":username"), ctx.Params(":reponame")),
+ "GoGetImport": composeGoGetImport(ctx.Params(":username"), strings.TrimSuffix(ctx.Params(":reponame"), ".git")),
"CloneLink": models.ComposeHTTPSCloneURL(ctx.Params(":username"), ctx.Params(":reponame")),
})))
}