Export NewContext
This commit is contained in:
parent
d504c9d2b5
commit
5b5a102c71
2 changed files with 4 additions and 5 deletions
|
@ -20,7 +20,8 @@ type Context struct {
|
|||
store map[string]interface{}
|
||||
}
|
||||
|
||||
func newContext(router *Router, res http.ResponseWriter, req *http.Request, param httprouter.Params) *Context {
|
||||
// NewContext creates a new context, this function is only exported for use in tests
|
||||
func NewContext(router *Router, res http.ResponseWriter, req *http.Request, param httprouter.Params) *Context {
|
||||
return &Context{router, req, res, param.ByName, make(map[string]interface{})}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue