From bb851ab75f24e4a2ad8593bda4ce72a76164ec26 Mon Sep 17 00:00:00 2001 From: Aaron Yodaiken Date: Mon, 25 Mar 2013 16:52:38 -0500 Subject: [PATCH] Add example MatcherFunc --- doc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 217e948..d6c5979 100644 --- a/doc.go +++ b/doc.go @@ -87,7 +87,9 @@ There are several other matchers that can be added. To match path prefixes: ...or to use a custom matcher function: - r.MatcherFunc(myFunc) + r.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool { + return r.ProtoMajor == 0 + }) ...and finally, it is possible to combine several matchers in a single route: