Added middleware support
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/go/router/testdata"
|
||||
"git.akyoto.dev/go/server"
|
||||
)
|
||||
|
||||
@ -26,7 +27,7 @@ func BenchmarkGitHub(b *testing.B) {
|
||||
response := &NullResponse{}
|
||||
s := server.New()
|
||||
|
||||
for _, route := range loadRoutes("testdata/github.txt") {
|
||||
for _, route := range testdata.Routes("testdata/github.txt") {
|
||||
s.Router.Add(route.Method, route.Path, func(server.Context) error {
|
||||
return nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user