Renamed module
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package server_test
|
||||
package web_test
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/go/router/testdata"
|
||||
"git.akyoto.dev/go/server"
|
||||
"git.akyoto.dev/go/web"
|
||||
)
|
||||
|
||||
func BenchmarkStatic(b *testing.B) {
|
||||
@ -16,10 +16,10 @@ func BenchmarkStatic(b *testing.B) {
|
||||
"/hello/world",
|
||||
}
|
||||
|
||||
s := server.New()
|
||||
s := web.NewServer()
|
||||
|
||||
for _, path := range paths {
|
||||
s.Get(path, func(ctx server.Context) error {
|
||||
s.Get(path, func(ctx web.Context) error {
|
||||
return ctx.String("Hello")
|
||||
})
|
||||
}
|
||||
@ -42,10 +42,10 @@ func BenchmarkGitHub(b *testing.B) {
|
||||
"/repos/:a/:b",
|
||||
}
|
||||
|
||||
s := server.New()
|
||||
s := web.NewServer()
|
||||
|
||||
for _, route := range testdata.Routes("testdata/github.txt") {
|
||||
s.Router().Add(route.Method, route.Path, func(ctx server.Context) error {
|
||||
s.Router().Add(route.Method, route.Path, func(ctx web.Context) error {
|
||||
return ctx.String("Hello")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user