Documentation ¶
Overview ¶
Package httprouter implements the router.Interface and wraps the julienschmidt.httprouter.
All router params are getting set to the request context with the key router.PARAMS. See Options for more details. The matched url pattern is set to the request context with the key router.PATTERN.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyValuePair = errors.New("router/httprouter: Catch-all key/value pair mismatch")
)
Error messages
Functions ¶
Types ¶
type Options ¶
type Options struct { // CatchAllKeyValuePair will convert /user/*user routes param to key/value pairs // True: route like /user/mode/view/id/12 will be converted to params ["mode":"view" "id":"12"] // False: route like /user/mode/view/id/12 will be converted to params ["0":"mode" "1":"view" "2":"id" "3":"12"] CatchAllKeyValuePair bool }
Options for the router provider
Click to show internal directories.
Click to hide internal directories.