1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-28 08:38:39 +02:00

Fixed build error

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-06-03 16:19:03 -07:00
parent e7c1d5d9fb
commit 80a4b41e16
3 changed files with 4 additions and 2 deletions

View File

@ -141,10 +141,11 @@ var (
// New creates an Echo instance.
func New() (e *Echo) {
e = &Echo{maxParam: new(int), router: NewRouter(e)}
e = &Echo{maxParam: new(int)}
e.pool.New = func() interface{} {
return NewContext(nil, new(Response), e)
}
e.router = NewRouter(e)
//----------
// Defaults

View File

@ -302,7 +302,7 @@ func (r *Router) Find(method, path string, ctx *Context) (h HandlerFunc, e *Echo
c = cn.findMchild()
if c != nil {
cn = c
ctx.pvalues[n] = search
ctx.pvalues[0] = search
search = "" // End search
continue
}

View File

@ -469,6 +469,7 @@ func TestRouterPriority(t *testing.T) {
if assert.NotNil(t, h) {
h(c)
assert.Equal(t, 7, c.Get("g"))
assert.Equal(t, "joe/books", c.Param("_name"))
}
}