about summary refs log tree commit diff
path: root/mooh.go
diff options
context:
space:
mode:
authorFranck Cuny <franck@lumberjaph.net>2013-04-22 20:30:25 -0700
committerFranck Cuny <franck@lumberjaph.net>2013-04-22 20:30:41 -0700
commit0ad196a0130164e6a18da7ee20156de0d508f8a3 (patch)
tree61503d325caba2ee6091625f89fe977015a95ffa /mooh.go
parentIn each route, keep a map of HTTP methods available. (diff)
downloadpath-router-0ad196a0130164e6a18da7ee20156de0d508f8a3.tar.gz
Change the interface to create routes.
Previously, to create a route, a user would call the AddRoute function,
and pass three arguments (the path, the HTTP method and the function).

This interface is way too limited if we need/want to expand what a route
is in the future.

Instead, we keep calling the AddRoute function to create a route, but
this time the user pass a Route structure.  The AddRoute will then
apply a few transformations and connect the route to the router.
Diffstat (limited to 'mooh.go')
-rw-r--r--mooh.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/mooh.go b/mooh.go
index a8858a6..2bcca75 100644
--- a/mooh.go
+++ b/mooh.go
@@ -10,6 +10,7 @@ func (self *Dispatcher) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
 	match, err := self.Match(req)
 
 	if err != nil {
+		fmt.Println(err)
 		fmt.Printf("oups")
 		return
 	}