Documentation
¶
Index ¶
- func HasLeadingSlash(pattern string) bool
- func HasTrailingSlash(pattern string) bool
- func JoinPatterns(rp *RegisteredPattern, pattern string) string
- func ParseSegments(path string) []string
- type FindNestedMatchesResults
- type Match
- type Matcher
- func (m *Matcher) FindBestMatch(realPath string) (*Match, bool)
- func (m *Matcher) FindNestedMatches(realPath string) (*FindNestedMatchesResults, bool)
- func (m *Matcher) Log(msg string)
- func (m *Matcher) NormalizePattern(originalPattern string) *RegisteredPattern
- func (m *Matcher) RegisterPattern(originalPattern string) *RegisteredPattern
- type Options
- type Params
- type RegisteredPattern
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLeadingSlash ¶
func HasTrailingSlash ¶
func JoinPatterns ¶
func JoinPatterns(rp *RegisteredPattern, pattern string) string
func ParseSegments ¶
Types ¶
type Match ¶
type Match struct {
*RegisteredPattern
Params Params
SplatValues []string
// contains filtered or unexported fields
}
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
func (*Matcher) FindNestedMatches ¶
func (m *Matcher) FindNestedMatches(realPath string) (*FindNestedMatchesResults, bool)
func (*Matcher) NormalizePattern ¶
func (m *Matcher) NormalizePattern(originalPattern string) *RegisteredPattern
func (*Matcher) RegisterPattern ¶
func (m *Matcher) RegisterPattern(originalPattern string) *RegisteredPattern
type Options ¶
type Options struct {
DynamicParamPrefixRune rune // Optional. Defaults to ':'.
SplatSegmentRune rune // Optional. Defaults to '*'.
// Optional. Defaults to empty string (effectively a trailing slash in the pattern).
// Could also be something like "_index" if preferred by the user.
ExplicitIndexSegment string
Quiet bool // Optional. Defaults to false. Set to true if you want to quash warnings.
}
type RegisteredPattern ¶
type RegisteredPattern struct {
// contains filtered or unexported fields
}
func (*RegisteredPattern) NormalizedPattern ¶
func (rp *RegisteredPattern) NormalizedPattern() string
func (*RegisteredPattern) NormalizedSegments ¶
func (rp *RegisteredPattern) NormalizedSegments() []*segment
func (*RegisteredPattern) OriginalPattern ¶
func (rp *RegisteredPattern) OriginalPattern() string
Click to show internal directories.
Click to hide internal directories.