diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-04-21 10:43:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 10:43:29 +0800 |
commit | f0db3da713eb9440923ddf376349e72b65f129ef (patch) | |
tree | fed96b5b8c2dbd95ec5ee3dd104a77b5ca78e42f /modules/context | |
parent | 42072783c910b6f4119bb410f0e9dd55ebfc0927 (diff) | |
download | gitea-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/context')
-rw-r--r-- | modules/context/repo.go | 2 |
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")), }))) } |