From 43a403b45d9644e634c2c560d16331305d83a4b0 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 5 Oct 2026 22:21:26 +0200 Subject: pathrouter: remove type Context from public interface --- pathrouter/element.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pathrouter/element.go') diff --git a/pathrouter/element.go b/pathrouter/element.go index 395fb40..6426c04 100644 --- a/pathrouter/element.go +++ b/pathrouter/element.go @@ -3,7 +3,11 @@ package pathrouter -import "go.xyrillian.de/gg/options" +import ( + "net/http" + + "go.xyrillian.de/gg/options" +) // Element is a [Matcher] that accepts subpaths with at least one path element. // The first path element must be equal to the given value, @@ -24,7 +28,7 @@ func element(value string, matcher realMatcher) Matcher { return realMatcher{ minLength: matcher.minLength + 1, maxLength: options.Map(matcher.maxLength, increment), - accept: func(path []string, rc Context) HandlerFunc { + accept: func(path []string, rc routingContext) http.HandlerFunc { if len(path) == 0 || path[0] != value { return nil } -- cgit v1.3.1