golint fixed for routers (#208)

This commit is contained in:
Lunny Xiao 2016-11-24 15:04:31 +08:00 committed by GitHub
parent 3a3782bb7f
commit 3917ed45de
35 changed files with 354 additions and 155 deletions

View file

@ -11,7 +11,8 @@ import (
"code.gitea.io/gitea/routers/api/v1/convert"
)
// https://github.com/gogits/go-gogs-client/wiki/Repositories#get-branch
// GetBranch get a branch of a repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#get-branch
func GetBranch(ctx *context.APIContext) {
branch, err := ctx.Repo.Repository.GetBranch(ctx.Params(":branchname"))
if err != nil {
@ -28,7 +29,8 @@ func GetBranch(ctx *context.APIContext) {
ctx.JSON(200, convert.ToBranch(branch, c))
}
// https://github.com/gogits/go-gogs-client/wiki/Repositories#list-branches
// ListBranches list all the branches of a repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories#list-branches
func ListBranches(ctx *context.APIContext) {
branches, err := ctx.Repo.Repository.GetBranches()
if err != nil {