summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/api.go2
-rw-r--r--modules/context/private.go2
-rw-r--r--modules/context/repo.go4
-rw-r--r--modules/context/utils.go2
4 files changed, 5 insertions, 5 deletions
diff --git a/modules/context/api.go b/modules/context/api.go
index 33534dbf6b..558a9f51ee 100644
--- a/modules/context/api.go
+++ b/modules/context/api.go
@@ -340,7 +340,7 @@ func ReferencesGitRepo(allowEmpty ...bool) func(ctx *APIContext) (cancel context
}
}
- return
+ return cancel
}
}
diff --git a/modules/context/private.go b/modules/context/private.go
index fdc7751227..9e7977b5d5 100644
--- a/modules/context/private.go
+++ b/modules/context/private.go
@@ -82,5 +82,5 @@ func PrivateContexter() func(http.Handler) http.Handler {
func OverrideContext(ctx *PrivateContext) (cancel context.CancelFunc) {
// We now need to override the request context as the base for our work because even if the request is cancelled we have to continue this work
ctx.Override, _, cancel = process.GetManager().AddTypedContext(graceful.GetManager().HammerContext(), fmt.Sprintf("PrivateContext: %s", ctx.Req.RequestURI), process.RequestProcessType, true)
- return
+ return cancel
}
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 217cbd3dfc..1836373918 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -734,7 +734,7 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
ctx.Data["GoDocDirectory"] = prefix + "{/dir}"
ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}"
}
- return
+ return cancel
}
// RepoRefType type of repo reference
@@ -1001,7 +1001,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
return
}
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
- return
+ return cancel
}
}
diff --git a/modules/context/utils.go b/modules/context/utils.go
index aea51cc5d6..a72c8b47e6 100644
--- a/modules/context/utils.go
+++ b/modules/context/utils.go
@@ -52,5 +52,5 @@ func parseTime(value string) (int64, error) {
func prepareQueryArg(ctx *Context, name string) (value string, err error) {
value, err = url.PathUnescape(ctx.FormString(name))
value = strings.TrimSpace(value)
- return
+ return value, err
}