dbrain / soggy

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

Consider allowing routes to take http.Handlers #11

Closed dbrain closed 12 years ago

dbrain commented 12 years ago

As a person who's like totally using the http Handlers and for some reason wants to add soggy to the mix, I want the router to accept Handlers instead of custom funcs. So you could say: server.Get("/apath", func (w http.ResponseWriter, r *http.Request) { ... })

dbrain commented 12 years ago

This is working, see the first few examples in kitchensink (/handler and /handlerFunc). The code needs a bit of a look at to sanity check (I was tired on train).. but in general, GO FORTH AND ENJOY.