feat: remove Gin and standardize on nethttp

This commit is contained in:
2026-09-21 00:57:06 +08:00
parent 61c37e0dba
commit 3bbf4627a1
34 changed files with 197 additions and 305 deletions

View File

@@ -4,19 +4,12 @@ import (
"testing"
"git.yuntuo.hk/k2safe/go-omni/httpx"
ginrouter "git.yuntuo.hk/k2safe/go-omni/transport/gin"
netrouter "git.yuntuo.hk/k2safe/go-omni/transport/nethttp"
"git.yuntuo.hk/k2safe/go-omni/transport/transporttest"
)
func TestAdapterContract(t *testing.T) {
for _, adapter := range []struct {
name string
newRouter func() httpx.Router
}{
{"gin", func() httpx.Router { return ginrouter.New("test") }},
{"nethttp", func() httpx.Router { return netrouter.New() }},
} {
t.Run(adapter.name, func(t *testing.T) { transporttest.Run(t, adapter.newRouter) })
}
t.Run("nethttp", func(t *testing.T) {
transporttest.Run(t, func() httpx.Router { return netrouter.New() })
})
}