From af4428738ad6159ef8469fa37b0c1b91b4fdb2d0 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 17 Feb 2022 13:17:55 +0000 Subject: [PATCH] More docs --- 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 c0cbad84a..cf33935fb 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -121,7 +121,7 @@ func Setup( // So make a named path variable called 'version' (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. + // using ?: so the final regexp becomes what is below. We also need a trailing slash to stop 'v33333' matching. v3mux := publicAPIMux.PathPrefix("/{version:(?:r0|v3)}/").Subrouter() unstableMux := publicAPIMux.PathPrefix("/unstable").Subrouter()