1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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

@@ -12,7 +12,8 @@ import (
"code.gitea.io/gitea/routers/repo"
)
// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-raw-content
// GetRawFile get a file by path on a repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-raw-content
func GetRawFile(ctx *context.APIContext) {
if !ctx.Repo.HasAccess() {
ctx.Status(404)
@@ -33,7 +34,8 @@ func GetRawFile(ctx *context.APIContext) {
}
}
// https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-archive
// GetArchive get archive of a repository
// see https://github.com/gogits/go-gogs-client/wiki/Repositories-Contents#download-archive
func GetArchive(ctx *context.APIContext) {
repoPath := models.RepoPath(ctx.Params(":username"), ctx.Params(":reponame"))
gitRepo, err := git.OpenRepository(repoPath)
@@ -46,6 +48,7 @@ func GetArchive(ctx *context.APIContext) {
repo.Download(ctx.Context)
}
// GetEditorconfig get editor config of a repository
func GetEditorconfig(ctx *context.APIContext) {
ec, err := ctx.Repo.GetEditorconfig()
if err != nil {