From 881774bc66b1ce10aec9c6de0799a3a4e1ce12af Mon Sep 17 00:00:00 2001 From: Steven127 <1270728683@qq.com> Date: Sun, 30 Jan 2022 17:14:43 +0800 Subject: [PATCH 1/2] fix: typo --- tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree.go b/tree.go index 8bc6fb55..d7e71ced 100644 --- a/tree.go +++ b/tree.go @@ -81,7 +81,7 @@ func longestCommonPrefix(a, b string) int { return i } -// addChild will add a child node, keeping wildcards at the end +// addChild will add a child node, keeping wildcardChild at the end func (n *node) addChild(child *node) { if n.wildChild && len(n.children) > 0 { wildcardChild := n.children[len(n.children)-1] From 7cb871473ad91b3d80fc2cb7c32e57562fbb8617 Mon Sep 17 00:00:00 2001 From: Steven127 <1270728683@qq.com> Date: Fri, 4 Feb 2022 20:53:42 +0800 Subject: [PATCH 2/2] fix: typo --- tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree.go b/tree.go index d7e71ced..18e50ee3 100644 --- a/tree.go +++ b/tree.go @@ -296,7 +296,7 @@ func (n *node) insertChild(path string, fullPath string, handlers HandlersChain) break } - // The wildcard name must only contain one ':' or '*' charactor + // The wildcard name must only contain one ':' or '*' character if !valid { panic("only one wildcard per path segment is allowed, has: '" + wildcard + "' in path '" + fullPath + "'")