creating sse broker
This commit is contained in:
@@ -5,10 +5,8 @@ import (
|
||||
"slices"
|
||||
)
|
||||
|
||||
// Middleware is a function that wraps an http.Handler.
|
||||
type Middleware func(http.Handler) http.Handler
|
||||
|
||||
// Router wraps http.ServeMux and provides grouping and middleware support.
|
||||
type Router struct {
|
||||
globalChain []Middleware
|
||||
routeChain []Middleware
|
||||
@@ -16,7 +14,7 @@ type Router struct {
|
||||
*http.ServeMux
|
||||
}
|
||||
|
||||
func NewRouter() *Router {
|
||||
func newRouter() *Router {
|
||||
return &Router{ServeMux: http.NewServeMux()}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user