diff --git a/modules/base/template.go b/modules/base/template.go
index 863bd89e81..6241497969 100644
--- a/modules/base/template.go
+++ b/modules/base/template.go
@@ -197,15 +197,3 @@ func DiffLineTypeToStr(diffType int) string {
}
return "same"
}
-
-const (
- TPL_GO_GET_META = ``
-)
-
-func GetGoGetMetaList() []byte {
- buf := bytes.NewBuffer([]byte(""))
- for meta := range GoGetMetas {
- buf.WriteString(fmt.Sprintf(TPL_GO_GET_META, Domain, meta))
- }
- return buf.Bytes()
-}
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
diff --git a/routers/dashboard.go b/routers/dashboard.go
index 12635412ad..2c81cf23c1 100644
--- a/routers/dashboard.go
+++ b/routers/dashboard.go
@@ -11,11 +11,6 @@ import (
)
func Home(ctx *middleware.Context) {
- if ctx.Query("go-get") == "1" {
- ctx.Write(base.GetGoGetMetaList())
- return
- }
-
if ctx.IsSigned {
user.Dashboard(ctx)
return
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index a7088d5552..dda26899d0 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -107,10 +107,6 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
}
func Single(ctx *middleware.Context, params martini.Params) {
- if ctx.Query("go-get") == "1" {
- base.GoGetMetas[strings.TrimSuffix(ctx.Repo.CloneLink.HTTPS, ".git")] = true
- }
-
branchName := ctx.Repo.BranchName
userName := ctx.Repo.Owner.Name
repoName := ctx.Repo.Repository.Name
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 1d63b46634..0c18c8083c 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -9,7 +9,7 @@
-
+ {{if .Repository.IsGoget}}{{end}}
{{if IsProdMode}}