go-zero/rest/httpx/router.go
2021-03-01 19:15:35 +08:00

12 lines
297 B
Go

package httpx
import "net/http"
// Router interface represents a http router that handles http requests.
type Router interface {
http.Handler
Handle(method string, path string, handler http.Handler) error
SetNotFoundHandler(handler http.Handler)
SetNotAllowedHandler(handler http.Handler)
}