mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
(#1554) Add support for all common compressions (write and read)
- Remove the context.Context interface and export the *context, the iris.Context now points to the pointer\nSupport compression and rate limiting in the FileServer\nBit of code organisation Former-commit-id: ad1c61bf968059510c6be9e7f2cceec7da70ba17
This commit is contained in:
@@ -288,9 +288,9 @@ func (app *Application) handle(controller interface{}, options ...Option) *Contr
|
||||
// HandleError registers a `hero.ErrorHandlerFunc` which will be fired when
|
||||
// application's controllers' functions returns an non-nil error.
|
||||
// Each controller can override it by implementing the `hero.ErrorHandler`.
|
||||
func (app *Application) HandleError(handler func(ctx context.Context, err error)) *Application {
|
||||
func (app *Application) HandleError(handler func(ctx *context.Context, err error)) *Application {
|
||||
errorHandler := hero.ErrorHandlerFunc(handler)
|
||||
app.container.GetErrorHandler = func(context.Context) hero.ErrorHandler {
|
||||
app.container.GetErrorHandler = func(*context.Context) hero.ErrorHandler {
|
||||
return errorHandler
|
||||
}
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user