From a5d0b97fc90e5cc8e355219f0ea3bab64bee6667 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 17 Feb 2022 17:15:22 +0000 Subject: [PATCH] Update routing.go --- clientapi/routing/routing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index 40ce6f1de..da2ccf2fa 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -118,7 +118,7 @@ func Setup( } // You can't just do PathPrefix("/(r0|v3)") because regexps only apply when inside named path variables. - // So make a named path variable called 'version' (which we will never read in handlers) and then do + // So make a named path variable called 'apiversion' (which we will never read in handlers) and then do // (r0|v3) - BUT this is a captured group, which makes no sense because you cannot extract this group // from a match (gorilla/mux exposes no way to do this) so it demands you make it a non-capturing group // using ?: so the final regexp becomes what is below. We also need a trailing slash to stop 'v33333' matching.