Skip to content
Myr

Fix typo in panic() message (extra single quote) (#1352)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Also fix the same typo in a comment

authored by Aurelien Regat-Barrel · committed by Bo-Yi Wu · parent bd4f73a · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:tree.go+2 added-2 removed
230 unmodified lines
231 return232233 } else if i == len(path) { // Make node a (in-path) leaf234 if n.handlers != nil {235 panic("handlers are already registered for path ''" + fullPath + "'")235 panic("handlers are already registered for path '" + fullPath + "'")236 }237 n.handlers = handlers238 }239 return
6 unmodified lines
246247func (n *node) insertChild(numParams uint8, path string, fullPath string, handlers HandlersChain) {248 var offset int // already handled bytes of the path249250 // find prefix until first wildcard (beginning with ':'' or '*'')250 // find prefix until first wildcard (beginning with ':' or '*')251 for i, max := 0, len(path); numParams > 0; i++ {252 c := path[i]253 if c != ':' && c != '*' {254 continue
366 unmodified lines