dbrain / soggy

An fast and simple express/sinatra like web framework.. thing.. for Go.
45 stars 1 forks source link

Consider making it easy to replace router #12

Closed dbrain closed 12 years ago

dbrain commented 12 years ago

As a +6 ice damage premature optimiser, I'd like to be able to replace the default router (that uses reflect a bit) for a ultra turbo suped up router (that has minimal features). This is probably already doable (change server.Router), but providing an out of the box super duper Router might be nice.. or you know, a maintenance issue waiting to happen.

dbrain commented 12 years ago

I've switched the Router over to an interface (SoggyRouter), so you can easily replace this. I didn't implement a basic router without the reflection magic.. I might if it gets requested enough and noone cares enough to implement their own.