1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

add IsDebug() shortcut method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-10 16:20:19 +03:00
parent ae67987f55
commit b17217444e
5 changed files with 22 additions and 2 deletions

View File

@@ -5054,6 +5054,12 @@ func (ctx *Context) Application() Application {
return ctx.app
}
// IsDebug reports whether the application runs with debug log level.
// It is a shortcut of Application.IsDebug().
func (ctx *Context) IsDebug() bool {
return ctx.app.IsDebug()
}
const errorContextKey = "iris.context.error"
// SetErr is just a helper that sets an error value