Documentation
¶
Index ¶
- func GetParams(r *http.Request) map[string]string
- type Router
- func (r Router) AddRoute(method, pattern string, handler http.Handler) Router
- func (r Router) Any(pattern string, handler http.Handler) Router
- func (r Router) Connect(pattern string, handler http.Handler) Router
- func (r Router) DefaultHandler(handler http.Handler) Router
- func (r Router) Delete(pattern string, handler http.Handler) Router
- func (r Router) Get(pattern string, handler http.Handler) Router
- func (r Router) Handler() http.Handler
- func (r Router) Head(pattern string, handler http.Handler) Router
- func (r Router) Options(pattern string, handler http.Handler) Router
- func (r Router) Patch(pattern string, handler http.Handler) Router
- func (r Router) Post(pattern string, handler http.Handler) Router
- func (r Router) Put(pattern string, handler http.Handler) Router
- func (r Router) Trace(pattern string, handler http.Handler) Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router with path management.
func (Router) AddRoute ¶
AddRoute for given method and pattern. Pattern must startss with a slash, should not contain trailing slash. Path variable must be prefixed with ':', next to the slash separator Glob variable must be prefixed with '*', next to the slash separator, at the end of the pattern.
func (Router) DefaultHandler ¶
DefaultHandler sets default handler when no route is not found.
Click to show internal directories.
Click to hide internal directories.