Documentation ¶
Index ¶
Constants ¶
View Source
const (
DEFAULT_DELIMITER = "/"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // delimiter The default delimiter for segments. (default: '/') Delimiter string // whitelist List of characters to consider delimiters when parsing. (default: undefined, any character) Whitelist string // sensitive When true the regexp will be case sensitive. (default: false) Sensitive bool // strict When true the regexp allows an optional trailing delimiter to match. (default: false) Strict bool // start When true the regexp will match from the beginning of the string. (default: true) Start bool // end When true the regexp will match to the end of the string. (default: true) End bool // endsWith Optional character, or list of characters, to treat as "end" characters. EndsWith string }
func NewOptions ¶
func NewOptions() Options
type PathMatcher ¶
func PathToRegexp ¶
func PathToRegexp(path string, options Options) (PathMatcher, error)
PathToRegexp converts a path to a tokenized regular expression based on `:NAME` tokens.
Click to show internal directories.
Click to hide internal directories.