From 198f95d82475f2355940a96859f8b51a140ff86f Mon Sep 17 00:00:00 2001 From: delong Date: Mon, 18 Jul 2016 13:28:55 +0800 Subject: [PATCH] fix README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 960ef7c..93091e4 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ Then register routes in the subrouter: ```go s.HandleFunc("/products/", ProductsHandler) s.HandleFunc("/products/{key}", ProductHandler) -s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) +s.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) ``` The three URL paths we registered above will only be tested if the domain is `www.example.com`, because the subrouter is tested first. This is not only convenient, but also optimizes request matching. You can create subrouters combining any attribute matchers accepted by a route.