Renamed module

This commit is contained in:
2024-03-22 15:08:24 +01:00
parent f65c34ea78
commit 5fdb9a883d
16 changed files with 80 additions and 80 deletions

View File

@ -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")
})
}