diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go
index 11b0009dbfe..1829e0d491c 100644
--- a/routers/repo/middlewares.go
+++ b/routers/repo/middlewares.go
@@ -8,6 +8,7 @@ import (
 	"code.gitea.io/gitea/modules/context"
 )
 
+// SetEditorconfigIfExists set editor config as render variable
 func SetEditorconfigIfExists(ctx *context.Context) {
 	ec, err := ctx.Repo.GetEditorconfig()
 
@@ -22,6 +23,7 @@ func SetEditorconfigIfExists(ctx *context.Context) {
 	ctx.Data["Editorconfig"] = ec
 }
 
+// SetDiffViewStyle set diff style as render variable
 func SetDiffViewStyle(ctx *context.Context) {
 	queryStyle := ctx.Query("style")