More docs

This commit is contained in:
Kegan Dougal 2022-02-17 13:17:55 +00:00
parent 9a9caf86eb
commit af4428738a

View file

@ -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()