urlpathpatternhandler

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAmbiguousCaptureVariableNames = errors.New("ambiguous capture variable names")
)

Functions

func ComparePatternHandlerToPath

func ComparePatternHandlerToPath(h Handler, requestPath string) int

func ComparePatternHandlers

func ComparePatternHandlers(l, r Handler) int

ComparePatternHandlers compares two PatternResponder objects without respect to the names of any capture variable names.

func ValidateResponders

func ValidateResponders(handlers []Handler) error

ValidateResponders should be called on a set of handlers to ensure there are no ambiguous patterns found.

Types

type Handler

type Handler interface {
	http.Handler
	Pattern() string
}

func NewHandler

func NewHandler(pattern string, handler http.Handler, contextKey any) Handler

Jump to

Keyboard shortcuts

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