1
0
Fork 0
forked from forgejo/forgejo

Update docs and comments to remove macaron (#14491)

This commit is contained in:
Lunny Xiao 2021-01-29 23:35:30 +08:00 committed by GitHub
parent 25b6255b92
commit 0cd87d64ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 32 additions and 78 deletions

View file

@ -373,7 +373,7 @@ func repoAssignment(ctx *Context, repo *models.Repository) {
ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty
}
// RepoIDAssignment returns a macaron handler which assigns the repo to the context.
// RepoIDAssignment returns a handler which assigns the repo to the context.
func RepoIDAssignment() func(ctx *Context) {
return func(ctx *Context) {
repoID := ctx.ParamsInt64(":repoid")
@ -393,7 +393,7 @@ func RepoIDAssignment() func(ctx *Context) {
}
}
// RepoAssignment returns a macaron to handle repository assignment
// RepoAssignment returns a middleware to handle repository assignment
func RepoAssignment() func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
@ -849,7 +849,7 @@ func GitHookService() func(ctx *Context) {
}
}
// UnitTypes returns a macaron middleware to set unit types to context variables.
// UnitTypes returns a middleware to set unit types to context variables.
func UnitTypes() func(ctx *Context) {
return func(ctx *Context) {
ctx.Data["UnitTypeCode"] = models.UnitTypeCode