aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/file.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-24 15:04:31 +0800
committerGitHub <noreply@github.com>2016-11-24 15:04:31 +0800
commit3917ed45de063b4e8868610c82d8172020d572fd (patch)
tree052b7651cbb64ae30f92efe87441ad1d4fa2d922 /routers/api/v1/repo/file.go
parent3a3782bb7fed768c1e832ff4c0a77f2f5281ed05 (diff)
downloadgitea-3917ed45de063b4e8868610c82d8172020d572fd.tar.gz
gitea-3917ed45de063b4e8868610c82d8172020d572fd.zip
golint fixed for routers (#208)
Diffstat (limited to 'routers/api/v1/repo/file.go')
-rw-r--r--routers/api/v1/repo/file.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go
index 96948ea459..16a31f96c7 100644
--- a/routers/api/v1/repo/file.go
+++ b/routers/api/v1/repo/file.go
@@ -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 {