1
0
Fork 0

Regex capturing group.

This commit is contained in:
Ludovic Fernandez 2017-10-23 10:20:02 +02:00 committed by Traefiker
parent afbad56012
commit 81f7aa9df2
6 changed files with 152 additions and 42 deletions

View file

@ -57,11 +57,6 @@ calling mux.Vars():
vars := mux.Vars(request)
category := vars["category"]
Note that if any capturing groups are present, mux will panic() during parsing. To prevent
this, convert any capturing groups to non-capturing, e.g. change "/{sort:(asc|desc)}" to
"/{sort:(?:asc|desc)}". This is a change from prior versions which behaved unpredictably
when capturing groups were present.
And this is all you need to know about the basic usage. More advanced options
are explained below.