diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-10-05 22:21:26 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-10-05 22:21:26 +0200 |
| commit | 43a403b45d9644e634c2c560d16331305d83a4b0 (patch) | |
| tree | 8ec3825579b388c205edfebed76b04906ae5368f /pathrouter/pathrouter_test.go | |
| parent | 6e5880aca9744d5e21434708f550f383400966e4 (diff) | |
| download | go-gg-43a403b45d9644e634c2c560d16331305d83a4b0.tar.gz | |
pathrouter: remove type Context from public interface
Diffstat (limited to 'pathrouter/pathrouter_test.go')
| -rw-r--r-- | pathrouter/pathrouter_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
