You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the simplicity and well documented nature of the little routing framework. Yet I found that the "catch all" routing pattern suggested in the document doesn't work at all (revision a9d769893b801081204defeb3466c3b13972edb4).
I eventually resolved the problem my self, and here's what I've done:
func (n *node) insert(pattern string, val *route) error {
// ....
Loop: for k, ch := range pattern { // add a label
// ...
swich ch {
// ...
case '*':
level = level.branch(ch, nil, nodeCatchAll)
break Loop // break here if meet a catch all
// ...
}
// ...
}
Another issue is that you use a csv like format to serialize parsed params, and this will cause parsing problem if there are , or : inside the matched url.
The text was updated successfully, but these errors were encountered:
I like the simplicity and well documented nature of the little routing framework. Yet I found that the "catch all" routing pattern suggested in the document doesn't work at all
(revision a9d769893b801081204defeb3466c3b13972edb4)
.I eventually resolved the problem my self, and here's what I've done:
Another issue is that you use a csv like format to serialize parsed params, and this will cause parsing problem if there are
,
or:
inside the matched url.The text was updated successfully, but these errors were encountered: