route

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher allows matching a given URL path towards a set of framework-like provided patterns.

func NewMatcher

func NewMatcher(routes []string) Matcher

NewMatcher creates a new Matcher that would allow validating given URL paths towards the provided set of routes

func (*Matcher) Find

func (rm *Matcher) Find(path string) string

Find the router pattern that would match a given URL path, or empty if no pattern matches it.

Jump to

Keyboard shortcuts

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