Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Route ¶
func Route(handlers ...RouteHandler) http.Handler
Route returns a http.Handler that routes requests to the appropriate given handler.
Types ¶
type RouteHandler ¶
type RouteHandler interface { http.Handler // Handle reports whether the handler can handle the given request. CanHandle(r *http.Request) bool }
RouteHandler is the interface that describe a routable http.Handler.
func Files ¶
func Files(dir string) RouteHandler
Files returns a handler that serves files from the given directory.
Click to show internal directories.
Click to hide internal directories.