mirror of
https://github.com/kataras/iris.git
synced 2025-12-28 07:17:06 +00:00
i18n: expose the LoaderConfig from the main i18n instance and add an example
Signed-off-by: Gerasimos (Makis) Maropoulos <kataras2006@hotmail.com>
This commit is contained in:
@@ -43,6 +43,13 @@ func Skip(ctx iris.Context) {
|
||||
ctx.Values().Set(skipLogContextKey, struct{}{})
|
||||
}
|
||||
|
||||
// SkipHandler same as `Skip` but it can be used
|
||||
// as a middleware, it executes ctx.Next().
|
||||
func SkipHandler(ctx iris.Context) {
|
||||
Skip(ctx)
|
||||
ctx.Next()
|
||||
}
|
||||
|
||||
func shouldSkip(ctx iris.Context) bool {
|
||||
return ctx.Values().Get(skipLogContextKey) != nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user