From d2de069dd272447d0709beccd5afda7431a9021e Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sun, 18 Oct 2026 19:39:07 +0200 Subject: pathrouter: add TODOs for APIs that I want to add --- pathrouter/matcher.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pathrouter') diff --git a/pathrouter/matcher.go b/pathrouter/matcher.go index 0ddd7f6..4dd3550 100644 --- a/pathrouter/matcher.go +++ b/pathrouter/matcher.go @@ -79,6 +79,10 @@ var ( _ url.URL ) +// TODO: new Matcher that introduces a Middleware which runs if a contained route matches (similar to how Variable() modifies routingContext on successful accept) +// TODO: store typed precomputed values in routingContext (func ComputedValue[T any](*http.Request) T and SetComputedValue analogously) +// TODO: then add Middleware variant that computes a value as func(*http.Request) T (e.g. to extract AuthN information from headers into an object of type Session etc.) + // Matcher is the common type for any actor that can inspect the path of a request URL (or a suffix of it) // and either accept or decline to handle the request. // -- cgit v1.3.1