We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0265fcd commit 9b9fb55Copy full SHA for 9b9fb55
tree.go
@@ -650,11 +650,9 @@ func (n *node) routes() []Route {
650
if h.handler == nil {
651
continue
652
}
653
- m := methodTypString(mt)
654
- if m == "" {
655
- continue
+ if m, ok := reverseMethodMap[mt]; ok {
+ hs[m] = h.handler
656
657
- hs[m] = h.handler
658
659
660
rt := Route{subroutes, hs, p}
@@ -788,15 +786,6 @@ func longestPrefix(k1, k2 string) int {
788
786
return i
789
787
790
791
-func methodTypString(method methodTyp) string {
792
- for s, t := range methodMap {
793
- if method == t {
794
- return s
795
- }
796
797
- return ""
798
-}
799
-
800
type nodes []*node
801
802
// Sort the list of nodes by label
0 commit comments