From 2b6cf3889eb7fcbcf9e8e85436302c037508eb4f Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Wed, 2 Jul 2014 11:09:04 +0200 Subject: [PATCH] Fixes crash when route path doesn't start with '/' --- gin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gin.go b/gin.go index a74bcd8..e5d20fd 100644 --- a/gin.go +++ b/gin.go @@ -75,7 +75,7 @@ func (a ErrorMsgs) String() string { // The most basic configuration func New() *Engine { engine := &Engine{} - engine.RouterGroup = &RouterGroup{nil, "", nil, engine} + engine.RouterGroup = &RouterGroup{nil, "/", nil, engine} engine.router = httprouter.New() engine.router.NotFound = engine.handle404 return engine