Skip to content

Commit

Permalink
Fix a syntax error in a code comment (gin-gonic#3201)
Browse files Browse the repository at this point in the history
  • Loading branch information
L2ncE authored Jun 15, 2022
1 parent 05caa5c commit 815122a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ walk: // Outer loop for walking the tree

if !n.wildChild {
// If the path at the end of the loop is not equal to '/' and the current node has no child nodes
// the current node needs to roll back to last vaild skippedNode
// the current node needs to roll back to last valid skippedNode
if path != "/" {
for l := len(*skippedNodes); l > 0; {
skippedNode := (*skippedNodes)[l-1]
Expand Down Expand Up @@ -572,7 +572,7 @@ walk: // Outer loop for walking the tree

if path == prefix {
// If the current path does not equal '/' and the node does not have a registered handle and the most recently matched node has a child node
// the current node needs to roll back to last vaild skippedNode
// the current node needs to roll back to last valid skippedNode
if n.handlers == nil && path != "/" {
for l := len(*skippedNodes); l > 0; {
skippedNode := (*skippedNodes)[l-1]
Expand Down

0 comments on commit 815122a

Please sign in to comment.