From 3f6f7c5abed398eab447ccbe22ca5a76a8b4b719 Mon Sep 17 00:00:00 2001 From: Eric Skoglund Date: Wed, 15 Apr 2020 09:21:52 +0200 Subject: [PATCH] Remove stale text from comment. Comment for CurrentRoute claimed that setting the KeepContext option would propagate the Route even after the request. The KeepContext option is deprecated and has no effect. --- mux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mux.go b/mux.go index c9ba647..782a34b 100644 --- a/mux.go +++ b/mux.go @@ -435,8 +435,7 @@ func Vars(r *http.Request) map[string]string { // CurrentRoute returns the matched route for the current request, if any. // This only works when called inside the handler of the matched route // because the matched route is stored in the request context which is cleared -// after the handler returns, unless the KeepContext option is set on the -// Router. +// after the handler returns. func CurrentRoute(r *http.Request) *Route { if rv := r.Context().Value(routeKey); rv != nil { return rv.(*Route)