diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-02-14 20:18:08 -0700 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-02-14 20:18:08 -0700 |
commit | bc96af40db6104580c22086c8db7c8119a404257 (patch) | |
tree | 9cf6bf964110d4a22d2593d060da6add7a2e8891 /router.go | |
parent | fcf545c27c70fb795a631a42738c486c07092e83 (diff) |
no need to combine sub-router params any more
Diffstat (limited to 'router.go')
-rw-r--r-- | router.go | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -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{} |