When registering handlers, is there any way to specify wildcards in the pattern?
For example:
http.HandleFunc("/groups/*/people", peopleInGroupHandler)
Where the * could be any valid URL string. Or is the only solution to match /groups and figure the rest out from within the handler (peopleInGroupHandler) func?
The patterns for http.Handler and http.HandleFunc aren’t regular expressions or globs. There isn’t a way to specify wildcards. They’re documented here.
That said, it’s not too hard to create your own handler that can use regular expressions or any other kind of pattern you want. Here’s one that uses regular expressions (compiled, but not tested):