Discover Packages
github.com/plifk/market
internal
router
package
Version:
v0.0.0-...-c97fb91
Opens a new window with list of versions in this module.
Published: Oct 12, 2020
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
WithParams can be used to annotate the context of a request with route params.
Mux is a set of routes.
NOTE(henvic): This could be a tree router too, but this should be good and simple enough.
ServeHTTP handles request using the mux router.
URL paths are normalized by stripping trailing slash.
If a match is not found, it uses the m.DefaultHandler or http.NotFound if a default handler is not set.
Validate router mux entries.
Params for routing URL paths.
Route for the HTTP server. Pattern uses a :field format.
Pattern example: /products/:product_id/details
Method cannot be empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.