Browse Source

Fixing Regexp in the benchmark test (#234)

Signed-off-by: DiSiqueira <dieg0@live.com>
pull/240/head
Diego Siqueira 8 years ago committed by Kamil Kisiel
parent
commit
599cba5e7b
  1. 2
      bench_test.go

2
bench_test.go

@ -24,7 +24,7 @@ func BenchmarkMux(b *testing.B) {
func BenchmarkMuxAlternativeInRegexp(b *testing.B) {
router := new(Router)
handler := func(w http.ResponseWriter, r *http.Request) {}
router.HandleFunc("/v1/{v1:(a|b)}", handler)
router.HandleFunc("/v1/{v1:(?:a|b)}", handler)
requestA, _ := http.NewRequest("GET", "/v1/a", nil)
requestB, _ := http.NewRequest("GET", "/v1/b", nil)

Loading…
Cancel
Save