diff options
Diffstat (limited to 'handler.go')
-rw-r--r-- | handler.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -29,11 +29,11 @@ func FallthroughHandler(handlers ...Handler) Handler { } } -// Filter builds a middleware which only calls the wrapped under a condition. +// Filter builds a middleware which only calls the wrapped Handler under a condition. // -// When the condition function returns false it instead invokes the -// test-failure handler. The failure handler may also be nil, in which case -// the final handler will return a nil response whenever the condition fails. +// When the condition function returns false it instead invokes the test-failure +// handler. The failure handler may also be nil, in which case the final handler will +// return a nil response whenever the condition fails. func Filter( condition func(context.Context, *Request) bool, failure Handler, |