• Unified diff
  • Side-by-side diff
  • Ignore whitespace
  • Show whitespace characters
  • Hide e-diff
  • Show annotations
Source viewDiff to previous
 
49
49
 
​
50
50
 
    // Configurable Handler to be used when the request method does not match the route.
51
51
 
    MethodNotAllowedHandler http.Handler
52
52
 
​
53
53
 
    // Routes to be matched, in order.
54
54
 
    routes []*Route
55
55
 
​
56
56
 
    // Routes by name for URL building.
57
57
 
    namedRoutes map[string]*Route
58
58
 
​
 
59
+
    // Routes by name for URL building.
 
60
+
    namedRoutes2 map[string]*Route
 
61
+
​
 
62
+
    // Routes by name for URL building.
 
63
+
    namedRoutes3 map[string]*Route
 
64
+
​
59
65
 
    // If true, do not clear the request context after handling the request.
60
66
 
    //
61
67
 
    // Deprecated: No effect when go1.7+ is used, since the context is stored
62
68
 
    // on the request itself.
63
69
 
    KeepContext bool
64
70
 
​
65
71
 
    // Slice of middlewares to be called after a match is found
66
72
 
    middlewares []middleware
67
73
 
​
68
74
 
    // configuration shared with `Route`
Show more
91
97
 
    // The scheme used when building URLs.
92
98
 
    buildScheme string
93
99
 
​
94
100
 
    buildVarsFunc BuildVarsFunc
95
101
 
}
96
102
 
​
97
103
 
// returns an effective deep copy of `routeConf`
98
104
 
func copyRouteConf(r routeConf) routeConf {
99
105
 
    c := r
100
106
 
​
101
 
-
    if r.regexp.path != nil {
102
 
-
        c.regexp.path = copyRouteRegexp(r.regexp.path)
103
 
-
    }
104
 
-
​
105
 
-
    if r.regexp.host != nil {
106
 
-
        c.regexp.host = copyRouteRegexp(r.regexp.host)
107
 
-
    }
108
 
-
​
109
107
 
    c.regexp.queries = make([]*routeRegexp, 0, len(r.regexp.queries))
110
108
 
    for _, q := range r.regexp.queries {
111
109
 
        c.regexp.queries = append(c.regexp.queries, copyRouteRegexp(q))
112
110
 
    }
113
111
 
​
114
112
 
    c.matchers = make([]matcher, 0, len(r.matchers))
115
113
 
    for _, m := range r.matchers {
116
114
 
        c.matchers = append(c.matchers, m)
117
115
 
    }
118
116
 
​