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/pathrouter_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pathrouter/pathrouter_test.go') diff --git a/pathrouter/pathrouter_test.go b/pathrouter/pathrouter_test.go index 96083ed..08a7c69 100644 --- a/pathrouter/pathrouter_test.go +++ b/pathrouter/pathrouter_test.go @@ -19,10 +19,10 @@ import ( func TestRouting(t *testing.T) { // helper methods varRx := regexp.MustCompile(`\$\w+`) - h := func(status int, msgBase string) pr.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request, rc pr.Context) { + h := func(status int, msgBase string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { msg := varRx.ReplaceAllStringFunc(msgBase, func(match string) string { - return rc.Variable(strings.TrimPrefix(match, "$")) + return pr.VariableValue(r, strings.TrimPrefix(match, "$")) }) if r.Method == http.MethodHead { w.WriteHeader(status) -- cgit v1.3.1