1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-06 03:27:27 +00:00

dependency injection: func (...<T>) iris.Handler can be generated to a simple iris handler if <T> are static dependencies

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-06-10 21:16:00 +03:00
parent 8f9140b705
commit 96c2dec47f
6 changed files with 58 additions and 7 deletions

View File

@@ -454,10 +454,9 @@ func (r Response) Dispatch(ctx *context.Context) {
ctx.SetLanguage(r.Lang)
r.Content = []byte(ctx.Tr(r.Text, r.Object))
return
} else {
r.Content = []byte(r.Text)
}
r.Content = []byte(r.Text)
}
err := dispatchCommon(ctx, r.Code, r.ContentType, r.Content, r.Object, defaultResultHandler, true)