diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:27:29 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:27:29 -0400 |
commit | ea74be2f2eb2356666c39448019956f9fe1c1f99 (patch) | |
tree | bb195120174ca3fd9b782e831d6c498ab7489816 /routers | |
parent | d26a333dfbd47e9b6f92fad7fcd779ad72070f8a (diff) | |
download | gitea-ea74be2f2eb2356666c39448019956f9fe1c1f99.tar.gz gitea-ea74be2f2eb2356666c39448019956f9fe1c1f99.zip |
go get
Diffstat (limited to 'routers')
-rw-r--r-- | routers/dashboard.go | 5 | ||||
-rw-r--r-- | routers/repo/repo.go | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go index 2c81cf23c1..12635412ad 100644 --- a/routers/dashboard.go +++ b/routers/dashboard.go @@ -11,6 +11,11 @@ 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 dda26899d0..a7088d5552 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -107,6 +107,10 @@ 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 |