Documentation ¶
Index ¶
- type Router
- func (r *Router) Add(method string, pattern string, h http.HandlerFunc)
- func (r *Router) Name() string
- func (r *Router) ParamRegexp() bool
- func (r *Router) ParseHandler(w http.ResponseWriter, req *http.Request)
- func (r *Router) Serve(w http.ResponseWriter, req *http.Request)
- func (r *Router) Setup() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a wrapper for the http.ServeMux from the standard library.
func (*Router) Add ¶
func (r *Router) Add(method string, pattern string, h http.HandlerFunc)
Add adds this route to the router
func (*Router) ParamRegexp ¶
ParamRegexp returns true if this router supports regexp params otherwise params will be passed as :user_id not {user_id:[0-9]+}
func (*Router) ParseHandler ¶
func (r *Router) ParseHandler(w http.ResponseWriter, req *http.Request)
ParseHandler does nothing for std mux - could do something? attempt to get query strings at least?
Click to show internal directories.
Click to hide internal directories.