From 6e09ef03b0d292c0a636edae960694d9ae3ade8d Mon Sep 17 00:00:00 2001 From: Aurelien Regat-Barrel Date: Fri, 11 May 2018 03:57:21 +0200 Subject: [PATCH] Fix typo in panic() message (extra single quote) (#1352) Also fix the same typo in a comment --- tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree.go b/tree.go index 20e3704b..b6530665 100644 --- a/tree.go +++ b/tree.go @@ -232,7 +232,7 @@ func (n *node) addRoute(path string, handlers HandlersChain) { } else if i == len(path) { // Make node a (in-path) leaf if n.handlers != nil { - panic("handlers are already registered for path ''" + fullPath + "'") + panic("handlers are already registered for path '" + fullPath + "'") } n.handlers = handlers } @@ -247,7 +247,7 @@ func (n *node) addRoute(path string, handlers HandlersChain) { func (n *node) insertChild(numParams uint8, path string, fullPath string, handlers HandlersChain) { var offset int // already handled bytes of the path - // find prefix until first wildcard (beginning with ':'' or '*'') + // find prefix until first wildcard (beginning with ':' or '*') for i, max := 0, len(path); numParams > 0; i++ { c := path[i] if c != ':' && c != '*' {