bsed / gorilla

Automatically exported from code.google.com/p/gorilla
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

mux: allow custom path/host parser #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
gorilla/mux could allow custom path/host parsers that override the one 
currently implemented in regexp.go. The idea is that routers could be 
configured to use a syntax different than {name:pattern} for path/host 
variables.

How it could be done: 

- Define an interface for the variables parser.
- regexp.go implements that interface.
- Router uses the default parser implementation if no other is set.

Not sure if this feature is really worth, but let's keep the idea registered 
since we don't have any other feature requests. :)

Original issue reported on code.google.com by rodrigo.moraes on 4 Apr 2012 at 10:10