routing

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathMatcher

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

func NewPathMatcherFromString

func NewPathMatcherFromString(path string) (PathMatcher, error)

func (*PathMatcher) MatchesURL

func (path *PathMatcher) MatchesURL(url string) bool

MatchesURL checks whether given string URL matches the path.

func (*PathMatcher) PathParams

func (path *PathMatcher) PathParams(url string) map[string]string

PathParams extracts the path parameters from given string url according to path configuration. Make sure that the path first matches the URL before trying to extract the path parameters.

Jump to

Keyboard shortcuts

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