(path string)
| 20 | const maxParamCount uint8 = ^uint8(0) |
| 21 | |
| 22 | func countParams(path string) uint8 { |
| 23 | var n uint |
| 24 | for i := 0; i < len(path); i++ { |
| 25 | if path[i] != ':' && path[i] != '*' { |
| 26 | continue |
| 27 | } |
| 28 | n++ |
| 29 | } |
| 30 | if n >= uint(maxParamCount) { |
| 31 | return maxParamCount |
| 32 | } |
| 33 | |
| 34 | return uint8(n) |
| 35 | } |
| 36 | |
| 37 | type nodeType uint8 |
| 38 |
no outgoing calls