summaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-18 22:10:29 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-18 22:10:29 -0700
commitf569df6eade1373dee7116ceac977636bdfc8edc (patch)
tree11cb486062fbbf5356bb0f7ca749af89ae3754ae /handler.go
parent6586db782ea6dcb5f2eb191a690ec7e7df51161f (diff)
bugfix and some docs cleanup
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/handler.go b/handler.go
index f940b77..a04cd33 100644
--- a/handler.go
+++ b/handler.go
@@ -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,