Documentation ¶
Index ¶
Constants ¶
View Source
const MaxParams = 30
Variables ¶
This section is empty.
Functions ¶
func GetTrimmedParam ¶
GetTrimmedParam trims the ':' & '?' from a string
Types ¶
type RouteParser ¶
type RouteParser struct { Segs []*routeSegment // the parsed segments of the route Params []string // that parameter names the parsed route WildCardCount int // number of wildcard parameters, used internally to give the wildcard parameter its number PlusCount int // number of plus parameters, used internally to give the plus parameter its number }
routeParser holds the path segments and param names
func ParseRoute ¶
func ParseRoute(pattern string) RouteParser
parseRoute analyzes the route and divides it into segments for constant areas and parameters, this information is needed later when assigning the requests to the declared routes
Click to show internal directories.
Click to hide internal directories.