path

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

from https://github.com/pillarjs/path-to-regexp/tree/c7ec332e87d8560673884d5629e1cb23cb03cb87

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matcher

func Matcher(expr string) (func(string, map[any]string) bool, error)

func PathToRegexp

func PathToRegexp(path string, keys *[]Key) (*regexp.Regexp, error)

Types

type Key

type Key struct {
	Name     any
	Prefix   string
	Suffix   string
	Pattern  string
	Modifier string
}

type Token

type Token any

type TokensToRegexpOptions

type TokensToRegexpOptions struct {
	Prefixes  string
	Delimiter string
	Strict    bool
	Start     bool
	End       bool
	Encode    func(string) string
	EndsWith  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL