mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
golint fixed for routers (#208)
This commit is contained in:
parent
3a3782bb7f
commit
3917ed45de
35 changed files with 354 additions and 155 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue