Documentation
¶
Overview ¶
Package path provide path based routing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type H ¶
type H map[string]http.HandlerFunc
H is type for mapping path and its handler
parameterized segment of path can be prefixed with ":", example:
/info/:userid/name
handler registered here is compared by prefix path match,
h := H{ "a/b": myhandler, }.C()
request to "/a/b/c/d/e" will be still handled by myhandler, see segment.MustEnd
func (H) Compile ¶
func (h H) Compile(notfoundHandler http.HandlerFunc) http.HandlerFunc
Compile into single http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.