about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@lumberjaph.net>2013-04-28 13:27:58 -0700
committerFranck Cuny <franck@lumberjaph.net>2013-04-28 13:27:58 -0700
commitd8366ebad8fd8b51099f586deaf32446c93d23ef (patch)
treeffe2b159962d6893cd8dcb04aa697abd8c2ad600
parentPlaceholder in URL use the {\w+} form, not :\w+ (diff)
downloadpath-router-d8366ebad8fd8b51099f586deaf32446c93d23ef.tar.gz
Update README with correct placeholders in URL.
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 8aab966..6079519 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ or:
 
     &Route{
         Method: "GET",
-        Path: "/blog/:year/:month/:day",
+        Path: "/blog/{year}/{month}/{day}",
         Code: GetArticle,
 		Validations: map[string]*regexp.Regexp{
 			"year":  regexp.MustCompile("[\\d]{4}"),
@@ -40,7 +40,7 @@ If you use validation, you can write this kind of route with no ambiguity:
 
     &Route{
         Method: "GET",
-        Path: "/user/:id",
+        Path: "/user/{id}",
         Code: GetUserById,
         Validations: map[string]*regexp.Regexp{
             "id": regexp.MustCompile("[\\d]+"),
@@ -49,7 +49,7 @@ If you use validation, you can write this kind of route with no ambiguity:
 
     &Route{
         Method: "GET",
-        Path: "/user/:name",
+        Path: "/user/{name}",
         Code: GetUserByName,
         Validations: map[string]*regexp.Regexp{
             "id": regexp.MustCompile("[a-zA-Z]+"),