So `mux.HandleFunc("/"...)` always handles _everything_.
And there is no easy way to say "no, just handle exact matches, plus maybe ? queries". As gorilla/mux does.
I don't think that is changed in the new go?
So `mux.HandleFunc("/"...)` always handles _everything_.
And there is no easy way to say "no, just handle exact matches, plus maybe ? queries". As gorilla/mux does.
I don't think that is changed in the new go?
"There is one last, special wildcard: {$} matches only the end of the URL, allowing writing a pattern that ends in slash but does not match all extensions of that path. For example, the pattern /{$} matches the root page / but (unlike the pattern / today) does not match a request for /anythingelse."
That is amazing. Goodbye gorilla mux.
But that’s not backwards-compatible, sadly, so this is going to remain a historical wart.
> Longer patterns take precedence over shorter ones,
[edit] Heh, I guess you'd know better. :D The comparison between the hn username and github username resolved favourably in the end. :P