go lint fixed for routers/admin

This commit is contained in:
Lunny Xiao 2016-11-21 11:21:24 +08:00
parent bd13c81684
commit 659bc2814c
6 changed files with 73 additions and 51 deletions

View file

@ -14,9 +14,10 @@ import (
)
const (
REPOS base.TplName = "admin/repo/list"
tplRepos base.TplName = "admin/repo/list"
)
// Repos show all the repositories
func Repos(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.repositories")
ctx.Data["PageIsAdmin"] = true
@ -28,10 +29,11 @@ func Repos(ctx *context.Context) {
Private: true,
PageSize: setting.UI.Admin.RepoPagingNum,
OrderBy: "owner_id ASC, name ASC, id ASC",
TplName: REPOS,
TplName: tplRepos,
})
}
// DeleteRepo delete one repository
func DeleteRepo(ctx *context.Context) {
repo, err := models.GetRepositoryByID(ctx.QueryInt64("id"))
if err != nil {