From bc96af40db6104580c22086c8db7c8119a404257 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Tue, 14 Feb 2023 20:18:08 -0700 Subject: no need to combine sub-router params any more --- router.go | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'router.go') diff --git a/router.go b/router.go index 1d8e93d..41a3a04 100644 --- a/router.go +++ b/router.go @@ -50,16 +50,6 @@ func (r Router) Handler(ctx context.Context, request *Request) *Response { return nil } - // as we may be a sub-router, check for existing stashed params - // and combine with that map if found. - priorParams := RouteParams(ctx) - for k, v := range priorParams { - if k == subrouterPathKey { - continue - } - params[k] = v - } - return handler(context.WithValue(ctx, routeParamsKey, params), request) } @@ -114,8 +104,6 @@ func RouteParams(ctx context.Context) map[string]string { return nil } -const subrouterPathKey = "subrouter_path" - type routeParamsKeyType struct{} var routeParamsKey = routeParamsKeyType{} -- cgit v1.2.3