Browse Source

Merge pull request #494 from dolmen/fix/indent-route-debug

Fix indent of routes debug prints
Manu Mtz.-Almeida 10 years ago
parent
commit
79ea1eaaf2
2 changed files with 2 additions and 2 deletions
  1. 1 1
      debug.go
  2. 1 1
      debug_test.go

+ 1 - 1
debug.go

@@ -24,7 +24,7 @@ func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) {
 	if IsDebugging() {
 		nuHandlers := len(handlers)
 		handlerName := nameOfFunction(handlers.Last())
-		debugPrint("%-5s %-25s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers)
+		debugPrint("%-6s %-25s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers)
 	}
 }
 

+ 1 - 1
debug_test.go

@@ -63,7 +63,7 @@ func TestDebugPrintRoutes(t *testing.T) {
 	defer teardown()
 
 	debugPrintRoute("GET", "/path/to/route/:param", HandlersChain{func(c *Context) {}, handlerNameTest})
-	assert.Equal(t, w.String(), "[GIN-debug] GET   /path/to/route/:param     --> github.com/gin-gonic/gin.handlerNameTest (2 handlers)\n")
+	assert.Equal(t, w.String(), "[GIN-debug] GET    /path/to/route/:param     --> github.com/gin-gonic/gin.handlerNameTest (2 handlers)\n")
 }
 
 func setup(w io.Writer) {