@@ -94,7 +94,7 @@ func TestCountParams(t *testing.T) {
94
94
}
95
95
96
96
func TestEmptyPath (t * testing.T ) {
97
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
97
+ tree := & router {method : "GET" , root : & node {}}
98
98
99
99
routes := [... ]string {
100
100
"" ,
@@ -113,7 +113,7 @@ func TestEmptyPath(t *testing.T) {
113
113
}
114
114
115
115
func TestTreeAddAndGet (t * testing.T ) {
116
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
116
+ tree := & router {method : "GET" , root : & node {}}
117
117
118
118
routes := [... ]string {
119
119
"/hi" ,
@@ -150,7 +150,7 @@ func TestTreeAddAndGet(t *testing.T) {
150
150
}
151
151
152
152
func TestTreeWildcard (t * testing.T ) {
153
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
153
+ tree := & router {method : "GET" , root : & node {}}
154
154
155
155
routes := [... ]string {
156
156
"/" ,
@@ -198,7 +198,7 @@ func TestTreeWildcard(t *testing.T) {
198
198
}
199
199
200
200
func TestUnescapeParameters (t * testing.T ) {
201
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
201
+ tree := & router {method : "GET" , root : & node {}}
202
202
203
203
routes := [... ]string {
204
204
"/" ,
@@ -247,7 +247,7 @@ type testRoute struct {
247
247
}
248
248
249
249
func testRoutes (t * testing.T , routes []testRoute ) {
250
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
250
+ tree := & router {method : "GET" , root : & node {}}
251
251
252
252
for _ , route := range routes {
253
253
recv := catchPanic (func () {
@@ -306,7 +306,7 @@ func TestTreeChildConflict(t *testing.T) {
306
306
}
307
307
308
308
func TestTreeDuplicatePath (t * testing.T ) {
309
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
309
+ tree := & router {method : "GET" , root : & node {}}
310
310
311
311
routes := [... ]string {
312
312
"/" ,
@@ -342,7 +342,7 @@ func TestTreeDuplicatePath(t *testing.T) {
342
342
}
343
343
344
344
func TestEmptyWildcardName (t * testing.T ) {
345
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
345
+ tree := & router {method : "GET" , root : & node {}}
346
346
347
347
routes := [... ]string {
348
348
"/user:" ,
@@ -372,7 +372,7 @@ func TestTreeCatchAllConflict(t *testing.T) {
372
372
}
373
373
374
374
func TestTreeCatchMaxParams (t * testing.T ) {
375
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
375
+ tree := & router {method : "GET" , root : & node {}}
376
376
route := "/cmd/*filepath"
377
377
tree .addRoute (route , fakeHandler (route ))
378
378
}
@@ -387,7 +387,7 @@ func TestTreeDoubleWildcard(t *testing.T) {
387
387
}
388
388
389
389
for _ , route := range routes {
390
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
390
+ tree := & router {method : "GET" , root : & node {}}
391
391
recv := catchPanic (func () {
392
392
tree .addRoute (route , nil )
393
393
})
@@ -399,7 +399,7 @@ func TestTreeDoubleWildcard(t *testing.T) {
399
399
}
400
400
401
401
func TestTreeTrailingSlashRedirect2 (t * testing.T ) {
402
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
402
+ tree := & router {method : "GET" , root : & node {}}
403
403
404
404
routes := [... ]string {
405
405
"/api/:version/seller/locales/get" ,
@@ -444,7 +444,7 @@ func TestTreeTrailingSlashRedirect2(t *testing.T) {
444
444
}
445
445
446
446
func TestTreeTrailingSlashRedirect (t * testing.T ) {
447
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
447
+ tree := & router {method : "GET" , root : & node {}}
448
448
449
449
routes := [... ]string {
450
450
"/hi" ,
@@ -543,7 +543,7 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
543
543
}
544
544
545
545
func TestTreeRootTrailingSlashRedirect (t * testing.T ) {
546
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
546
+ tree := & router {method : "GET" , root : & node {}}
547
547
548
548
recv := catchPanic (func () {
549
549
tree .addRoute ("/:test" , fakeHandler ("/:test" ))
@@ -561,7 +561,7 @@ func TestTreeRootTrailingSlashRedirect(t *testing.T) {
561
561
}
562
562
563
563
func TestTreeFindCaseInsensitivePath (t * testing.T ) {
564
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
564
+ tree := & router {method : "GET" , root : & node {}}
565
565
566
566
longPath := "/l" + strings .Repeat ("o" , 128 ) + "ng"
567
567
lOngPath := "/l" + strings .Repeat ("O" , 128 ) + "ng/"
@@ -708,7 +708,7 @@ func TestTreeFindCaseInsensitivePath(t *testing.T) {
708
708
}
709
709
710
710
func TestTreeParamNotOptimize (t * testing.T ) {
711
- tree := & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
711
+ tree := & router {method : "GET" , root : & node {}}
712
712
routes := [... ]string {
713
713
"/:parama/start" ,
714
714
"/:paramb" ,
@@ -722,7 +722,7 @@ func TestTreeParamNotOptimize(t *testing.T) {
722
722
})
723
723
724
724
// other sequence
725
- tree = & router {method : "GET" , root : & node {}, hasTsrHandler : make ( map [ string ] bool ) }
725
+ tree = & router {method : "GET" , root : & node {}}
726
726
routes = [... ]string {
727
727
"/:paramb" ,
728
728
"/:parama/start" ,
0 commit comments