From 90911f53f284809245c0ca3010a272bc4b16f78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Thu, 10 Dec 2015 15:15:17 +0100 Subject: [PATCH] debug: fix indent of routes dump for DELETE method 'DELETE' is 6 chars and breaks indent of the routes dump (only 5 chars were reserved for the HTTP method). --- debug.go | 2 +- debug_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debug.go b/debug.go index 0836fc56..a121591a 100644 --- a/debug.go +++ b/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) } } diff --git a/debug_test.go b/debug_test.go index 7a352e6e..679c32c8 100644 --- a/debug_test.go +++ b/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) {