diff options
author | Franck Cuny <franck@lumberjaph.net> | 2013-04-21 16:44:54 -0700 |
---|---|---|
committer | Franck Cuny <franck@lumberjaph.net> | 2013-04-21 16:44:54 -0700 |
commit | 67782c84056e8bc87419e70eb493e97103a14cf1 (patch) | |
tree | 5d604ea4a6ff775f283343dbaa1c39bfe3930cd4 /request.go | |
parent | Add a simple test for the request type. (diff) | |
download | path-router-67782c84056e8bc87419e70eb493e97103a14cf1.tar.gz |
Let's be specific about the source of the param.
Parameters can come from the URL, but also the query string or the body. For now we create a function ParamRoute to be explicit about which param we want.
Diffstat (limited to 'request.go')
-rw-r--r-- | request.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/request.go b/request.go index d71d579..49ed702 100644 --- a/request.go +++ b/request.go @@ -5,12 +5,12 @@ import ( ) type Request struct { - params map[string]string + routeParams map[string]string *http.Request } -func (self *Request) Param(name string) string { - return self.params[name] +func (self *Request) RouteParam(name string) string { + return self.routeParams[name] } func NewRequest(req *http.Request, match *Match) *Request{ |