mirror of
https://github.com/kataras/iris.git
synced 2025-12-27 14:57:05 +00:00
add RemoveHandler to Party too, as requested at #1658
This commit is contained in:
@@ -32,7 +32,7 @@ The codebase for Dependency Injection, Internationalization and localization and
|
||||
- Add the ability to [share functions](https://github.com/kataras/iris/tree/master/_examples/routing/writing-a-middleware/share-funcs) between handlers chain and add an [example](https://github.com/kataras/iris/tree/master/_examples/routing/writing-a-middleware/share-services) on sharing Go structures (aka services).
|
||||
|
||||
- Add the new `Party.UseOnce` method to the `*Route`
|
||||
- Add a new `*Route.RemoveHandler(interface{}) int`, deletes a handler from begin, main and done handlers based on its name or the handler pc function. Returns the total amount of handlers removed.
|
||||
- Add a new `*Route.RemoveHandler(...interface{}) int` and `Party.RemoveHandler(...interface{}) Party` methods, delete a handler based on its name or the handler pc function.
|
||||
|
||||
```go
|
||||
func middleware(ctx iris.Context) {
|
||||
|
||||
Reference in New Issue
Block a user