diff --git a/web/pattern.go b/web/pattern.go index 401363d..9599bfb 100644 --- a/web/pattern.go +++ b/web/pattern.go @@ -29,11 +29,11 @@ func (p regexpPattern) Match(r *http.Request, c *C, dryrun bool) bool { return true } - if c.UrlParams == nil { - c.UrlParams = make(map[string]string, len(matches)-1) + if c.URLParams == nil { + c.URLParams = make(map[string]string, len(matches)-1) } for i := 1; i < len(matches); i++ { - c.UrlParams[p.names[i]] = matches[i] + c.URLParams[p.names[i]] = matches[i] } return true } @@ -185,11 +185,11 @@ func (s stringPattern) Match(r *http.Request, c *C, dryrun bool) bool { return true } - if c.UrlParams == nil && len(matches) > 0 { - c.UrlParams = make(map[string]string, len(matches)-1) + if c.URLParams == nil && len(matches) > 0 { + c.URLParams = make(map[string]string, len(matches)-1) } for i, match := range matches { - c.UrlParams[s.pats[i]] = match + c.URLParams[s.pats[i]] = match } return true } diff --git a/web/web.go b/web/web.go index a766591..b590d8b 100644 --- a/web/web.go +++ b/web/web.go @@ -93,7 +93,7 @@ type C struct { // strings that matched those identifiers, but if a unnamed regex // capture is used, it will be assigned to the special identifiers "$1", // "$2", etc. - UrlParams map[string]string + URLParams map[string]string // A free-form environment, similar to Rack or PEP 333's environments. // Middleware layers are encouraged to pass data to downstream layers // and other handlers using this map, and are even more strongly