summaryrefslogtreecommitdiffstats
path: root/modules/context/api.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-25 14:51:01 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-25 14:53:59 +0800
commitfaabc76fd68b0ecccba1dc8dae47220b28cce05a (patch)
treed0a7f9b6417bc0bf596b3e0ed4f53e055d90a930 /modules/context/api.go
parent6a28909f40ad1ff20d325d9be4ada87e5b75ce53 (diff)
downloadgitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.tar.gz
gitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.zip
Golint fixed for modules/context
Diffstat (limited to 'modules/context/api.go')
-rw-r--r--modules/context/api.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index 0da1823797..2823d696d2 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -16,6 +16,7 @@ import (
macaron "gopkg.in/macaron.v1"
)
+// APIContext is a specific macaron context for API service
type APIContext struct {
*Context
Org *APIOrganization
@@ -63,6 +64,7 @@ func (ctx *APIContext) SetLinkHeader(total, pageSize int) {
}
}
+// APIContexter returns apicontext as macaron middleware
func APIContexter() macaron.Handler {
return func(c *Context) {
ctx := &APIContext{