Skip to content

Commit a156a58

Browse files
authored
Add ServeHTTP to zrouter (#64)
1 parent 0a3a76b commit a156a58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/zrouter/zrouter.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type Routes interface {
5959
GetRegisteredRoutes() []RegisteredRoute
6060
SetDefaultMiddlewares()
6161
GetHandler() http.Handler
62+
ServeHTTP(w http.ResponseWriter, req *http.Request)
6263
}
6364

6465
type zrouter struct {
@@ -204,3 +205,7 @@ func (r *zrouter) GetRegisteredRoutes() []RegisteredRoute {
204205
func (r *zrouter) GetHandler() http.Handler {
205206
return r.router
206207
}
208+
209+
func (r *zrouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
210+
r.router.ServeHTTP(w, req)
211+
}

0 commit comments

Comments
 (0)