diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 05:02:11 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 05:02:11 -0400 |
commit | 4c1452574a14737b52b13ee2726fb5dd53f56cc1 (patch) | |
tree | 91618a20f058db0195830a90d27c96cd6cea4c78 /modules/middleware | |
parent | ea74be2f2eb2356666c39448019956f9fe1c1f99 (diff) | |
download | gitea-4c1452574a14737b52b13ee2726fb5dd53f56cc1.tar.gz gitea-4c1452574a14737b52b13ee2726fb5dd53f56cc1.zip |
go get
Diffstat (limited to 'modules/middleware')
-rw-r--r-- | modules/middleware/repo.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index cd13d4ef49..1e79ce9870 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -135,7 +135,8 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { ctx.Data["CloneLink"] = ctx.Repo.CloneLink if ctx.Repo.Repository.IsGoget { - ctx.Data["GoGetLink"] = strings.TrimSuffix(ctx.Repo.CloneLink.HTTPS, ".git") + ctx.Data["GoGetLink"] = fmt.Sprintf("%s%s/%s", base.AppUrl, user.LowerName, repo.LowerName) + ctx.Data["GoGetImport"] = fmt.Sprintf("%s/%s/%s", base.Domain, user.LowerName, repo.LowerName) } // when repo is bare, not valid branch |