package
Version:
v0.3.7
Opens a new window with list of versions in this module.
Published: Nov 26, 2024
License: BSD-3-Clause
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
¶
Parse will parse the URL path vars from r given the
element names and parsers defined in schema.
This method only works with requests being processed by
handlers of a gorilla/mux.
ParseValues will parse the parameters in vars given the
element names and parsers defined in schema.
Most use cases will be parsing values coming from an *http.Request,
which can be done conveniently with Parse.
A Parameter is a named element of a URL route,
encoded such that a gorilla router interprets it
as a path parameter.
Name returns the name of the parameter.
A Parser parses raw input into a destination variable.
Int creates a Parser that will parse a path element into i.
String creates a parser that will parse a path element into s.
A Schema describes how path variables should be parsed.
Currently only int and string types are supported.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.